SlideShare une entreprise Scribd logo
1  sur  21
Java
Topics
• What is java?
• Introduction
• Classes
• What is class?
• Output statement
• Createing a class
• Variables & methods
• access specifiers
Topics
• java & c++ between differences
• java advantages
• java disadvantages
• conclusion
What is java?
• Java is general purpose high level
programming language developed by
”SunMicrosystems”. A small team of
engineers, known as the Green Team,
initiated the language in 1991. Java was
originally called OAK, and was designed
for handheld devices and set-top boxes.
Oak was unsuccessful, so in 1995 Sun
changed the name to Java.
Introduction
• write the source code and save it with the
name of the class and the”extension.java”
• switch to the “MS-DOS” prompt and then
to the folder where you save the source
code.
• set the path to the folder
• c:programjavajdk 1:bin;
• using DOS commands path
Introduction
• compile the source code using the
compiler
Syntax:- javac filename.java
• excute the byte code using the integer
present
Syntax:- java byte code & file name
Output statement
• the capital statement in java
system.out.println() meaning are to print a
variable value
Syntax:-
System.out.print(“text”/variable);
System.out.printf(“text”/variable);
System.out.println(“text”/variable);
Structure of java program
Syntax:-
class name
{
Public static void main(string args[])
{
--------------
--------------
}
}
Classes
A class provide the basis for encapsulation it
helps you bind data and code into a
simngle unit
What is class ?
A reserved keyword with which we great
classes
What is variables and methods?
Specified a list of instance variables
Specified a list of member methods
Access specifiers
• it can be either private or public default is
public
Private members:-
The members declered as private cannot be
access from outside the class
Public members:-
The members declered as public can be
access from outside the class
Example programs
Class deepika
{
Public static void main(string args[])
{
System.out.println(“hello”);
System.out.println(“how r u”);
}
}
Differences b/w java & c++
• c++ :-
• Extends C with
object-oriented programming and
generic programming. C code can most
properly be used.
• Compatible with C source code, except
for a few corner cases.
• Native unsigned arithmetic support.
• Compile-time templates. Allows for Turing
complete meta-programming
Differences b/w java & c++
• java :
• strongly influenced c++/c syntax
• provides the java native interface and
recently java native access as a way to
directly c++/c codes
• runs on a virtual machine
• Is reflective, allowing metaprogramming
and dynamic code generation at runtime.
Advantages of java
• java is a platform-independent
• java is distributed
• java is interpreted
• java is distributed
• java is secure
• java is robust
• java is multitreded
Disadvantages of java
• Performance
• Look and Feel
• Single-paradigm language
Createing a object
Once aclass you can then create as many
object as you want belonging to the
variables of aclasses in fact object are
classes other term instances of a class
Conclusion
• Java offers the real possibility that most
programs can be written in a type-safe
language. However, for Java to be broadly
useful, it needs to have more expressive
power than it does at present.
• The appendices that follow present a
more detailed specification of our
extensions to the Java language and to
the Java virtual machine
JAVA INTRODUCTION
JAVA INTRODUCTION

Contenu connexe

Tendances

Tendances (20)

C functions
C functionsC functions
C functions
 
C tokens
C tokensC tokens
C tokens
 
Character set of c
Character set of cCharacter set of c
Character set of c
 
Tokens in C++
Tokens in C++Tokens in C++
Tokens in C++
 
Loops in C Programming Language
Loops in C Programming LanguageLoops in C Programming Language
Loops in C Programming Language
 
Algorithm and c language
Algorithm and c languageAlgorithm and c language
Algorithm and c language
 
Command line arguments
Command line argumentsCommand line arguments
Command line arguments
 
MCA 101-Programming in C with Data Structure UNIT I by Prof. Rohit Dubey
MCA 101-Programming in C with Data Structure UNIT I by Prof. Rohit DubeyMCA 101-Programming in C with Data Structure UNIT I by Prof. Rohit Dubey
MCA 101-Programming in C with Data Structure UNIT I by Prof. Rohit Dubey
 
java Features
java Featuresjava Features
java Features
 
Java Basics
Java BasicsJava Basics
Java Basics
 
Memory allocation in c
Memory allocation in cMemory allocation in c
Memory allocation in c
 
Function C++
Function C++ Function C++
Function C++
 
Difference between C++ and Java
Difference between C++ and JavaDifference between C++ and Java
Difference between C++ and Java
 
The Evolution of Java
The Evolution of JavaThe Evolution of Java
The Evolution of Java
 
Operators in c programming
Operators in c programmingOperators in c programming
Operators in c programming
 
Preprocessor
PreprocessorPreprocessor
Preprocessor
 
Operators in python
Operators in pythonOperators in python
Operators in python
 
Manipulators in c++
Manipulators in c++Manipulators in c++
Manipulators in c++
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 

En vedette

Accelerating Business Agility with Modern ALM
Accelerating Business Agility with Modern ALM Accelerating Business Agility with Modern ALM
Accelerating Business Agility with Modern ALM
Microsoft Visual Studio
 
Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvm
Ajinkya Khopade
 

En vedette (20)

Roslyn and C# 6.0 New Features
Roslyn and C# 6.0 New FeaturesRoslyn and C# 6.0 New Features
Roslyn and C# 6.0 New Features
 
Java introduction with JVM architecture
Java introduction with JVM architectureJava introduction with JVM architecture
Java introduction with JVM architecture
 
Advanced Defensive Coding Techniques (with Introduction to Design by Contract)
Advanced Defensive Coding Techniques (with Introduction to Design by Contract)Advanced Defensive Coding Techniques (with Introduction to Design by Contract)
Advanced Defensive Coding Techniques (with Introduction to Design by Contract)
 
Accelerating Business Agility with Modern ALM
Accelerating Business Agility with Modern ALM Accelerating Business Agility with Modern ALM
Accelerating Business Agility with Modern ALM
 
10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming
 
Compiler programming in c# report
Compiler programming in c# reportCompiler programming in c# report
Compiler programming in c# report
 
Applying Object Composition to Build Rich Domain Models
Applying Object Composition to Build Rich Domain ModelsApplying Object Composition to Build Rich Domain Models
Applying Object Composition to Build Rich Domain Models
 
Role of Grammar in Communication
Role of Grammar in CommunicationRole of Grammar in Communication
Role of Grammar in Communication
 
Introduction to Cloud computing
Introduction to Cloud computingIntroduction to Cloud computing
Introduction to Cloud computing
 
Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvm
 
Garbage Collection
Garbage CollectionGarbage Collection
Garbage Collection
 
Java Exception handling
Java Exception handlingJava Exception handling
Java Exception handling
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming Language
 
#ADC 2016 - Roslyn & Visual Studio Extensions
#ADC 2016 - Roslyn & Visual Studio Extensions#ADC 2016 - Roslyn & Visual Studio Extensions
#ADC 2016 - Roslyn & Visual Studio Extensions
 
Java vs .net (beginners)
Java vs .net (beginners)Java vs .net (beginners)
Java vs .net (beginners)
 
exception handling
exception handlingexception handling
exception handling
 
Static Analysis
Static AnalysisStatic Analysis
Static Analysis
 
Register Allocation
Register AllocationRegister Allocation
Register Allocation
 
An Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and RuntimeAn Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and Runtime
 
Visual studio 2017
Visual studio 2017Visual studio 2017
Visual studio 2017
 

Similaire à JAVA INTRODUCTION

Introduction to java
Introduction to javaIntroduction to java
Introduction to java
attiqrocket
 

Similaire à JAVA INTRODUCTION (20)

1 java programming- introduction
1  java programming- introduction1  java programming- introduction
1 java programming- introduction
 
1.Intro--Why Java.pptx
1.Intro--Why Java.pptx1.Intro--Why Java.pptx
1.Intro--Why Java.pptx
 
Lesson1 intro
Lesson1 introLesson1 intro
Lesson1 intro
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Lesson1 intro
Lesson1 introLesson1 intro
Lesson1 intro
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
 
Introduction to JAVA
Introduction to JAVAIntroduction to JAVA
Introduction to JAVA
 
01intro
01intro01intro
01intro
 
basic core java up to operator
basic core java up to operatorbasic core java up to operator
basic core java up to operator
 
CS8392 OOP
CS8392 OOPCS8392 OOP
CS8392 OOP
 
oop unit1.pptx
oop unit1.pptxoop unit1.pptx
oop unit1.pptx
 
java full 1 (Recovered).docx
java full 1 (Recovered).docxjava full 1 (Recovered).docx
java full 1 (Recovered).docx
 
introduction to c #
introduction to c #introduction to c #
introduction to c #
 
java completed units.docx
java completed units.docxjava completed units.docx
java completed units.docx
 
java full 1.docx
java full 1.docxjava full 1.docx
java full 1.docx
 
java full.docx
java full.docxjava full.docx
java full.docx
 
Comp102 lec 3
Comp102   lec 3Comp102   lec 3
Comp102 lec 3
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptxJAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
 
Basic online java course - Brainsmartlabs
Basic online java course  - BrainsmartlabsBasic online java course  - Brainsmartlabs
Basic online java course - Brainsmartlabs
 

Dernier

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 

Dernier (20)

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 

JAVA INTRODUCTION

  • 2. Topics • What is java? • Introduction • Classes • What is class? • Output statement • Createing a class • Variables & methods • access specifiers
  • 3. Topics • java & c++ between differences • java advantages • java disadvantages • conclusion
  • 4. What is java? • Java is general purpose high level programming language developed by ”SunMicrosystems”. A small team of engineers, known as the Green Team, initiated the language in 1991. Java was originally called OAK, and was designed for handheld devices and set-top boxes. Oak was unsuccessful, so in 1995 Sun changed the name to Java.
  • 5. Introduction • write the source code and save it with the name of the class and the”extension.java” • switch to the “MS-DOS” prompt and then to the folder where you save the source code. • set the path to the folder • c:programjavajdk 1:bin; • using DOS commands path
  • 6. Introduction • compile the source code using the compiler Syntax:- javac filename.java • excute the byte code using the integer present Syntax:- java byte code & file name
  • 7. Output statement • the capital statement in java system.out.println() meaning are to print a variable value Syntax:- System.out.print(“text”/variable); System.out.printf(“text”/variable); System.out.println(“text”/variable);
  • 8. Structure of java program Syntax:- class name { Public static void main(string args[]) { -------------- -------------- } }
  • 9. Classes A class provide the basis for encapsulation it helps you bind data and code into a simngle unit
  • 10. What is class ? A reserved keyword with which we great classes
  • 11. What is variables and methods? Specified a list of instance variables Specified a list of member methods
  • 12. Access specifiers • it can be either private or public default is public Private members:- The members declered as private cannot be access from outside the class Public members:- The members declered as public can be access from outside the class
  • 13. Example programs Class deepika { Public static void main(string args[]) { System.out.println(“hello”); System.out.println(“how r u”); } }
  • 14. Differences b/w java & c++ • c++ :- • Extends C with object-oriented programming and generic programming. C code can most properly be used. • Compatible with C source code, except for a few corner cases. • Native unsigned arithmetic support. • Compile-time templates. Allows for Turing complete meta-programming
  • 15. Differences b/w java & c++ • java : • strongly influenced c++/c syntax • provides the java native interface and recently java native access as a way to directly c++/c codes • runs on a virtual machine • Is reflective, allowing metaprogramming and dynamic code generation at runtime.
  • 16. Advantages of java • java is a platform-independent • java is distributed • java is interpreted • java is distributed • java is secure • java is robust • java is multitreded
  • 17. Disadvantages of java • Performance • Look and Feel • Single-paradigm language
  • 18. Createing a object Once aclass you can then create as many object as you want belonging to the variables of aclasses in fact object are classes other term instances of a class
  • 19. Conclusion • Java offers the real possibility that most programs can be written in a type-safe language. However, for Java to be broadly useful, it needs to have more expressive power than it does at present. • The appendices that follow present a more detailed specification of our extensions to the Java language and to the Java virtual machine