SlideShare a Scribd company logo
Fundamental of Java Programming
Introduction to Java
Introduction to Java
Java is a general purpose object oriented
Programming language. It is developed by Sun
Microsystems of USA in 1991.
Its original name was Oak given by James
Gosling, who is one of the inventors of the
language.
Java was initially Developed for Softwares for
Consumer Electronics Devices like TVs, VCRs, and
others.
The father of Java – James Gosling
Introduction to Java
Java has taken the most popular languages of
that time i.e. C and C++ as base by considering its
various features and removing their limitations.
With this they have develop a most simple,
reliable, portable and powerful language.
History of Java
Year Development
1990 Sun Microsystems decided to develop a special software for consumer
electronics devices. A Team has been formed to undertake this task.
James Gosling was the head of that team.
1991 The team announce a new language called “Oak”
1992 The team known as “Green Project” team, have demonstrated the use
of language on a list of home appliances.
1993 World Wide Web (WWW) has given support to Green Project Team and
they have started thinking for development of Web Applets
1994 A new Web browser called HotJava has been developed by the Team to
run applets.
1995 Oak was rename to Java due to some legal problems.
1996 Sun release Java Development Kit 1.0 (JDK 1.0)
History of Java
Year Development
1997 Sun release JDK 1.1
1998 Sun release Java 2 with JDK 1.2
1999 Sun release J2SE and J2EE
2000 JDK 1.3
2002 JDK 1.4
2004 JDK 1.5
2006 JDK 1.6
Features to Java
Java has various features which makes it
simple, secure and compact. They are as follows:
(1) Compiled and Interpreted
(2) Platform Independent and Portable
(3) Object Oriented
(4) Secure
(5) Distributed
(6) Familiar, Simple and Small
(7) Multithreaded and Interactive
(8) High Performance
(9) Dynamic and Extensible
Features to Java
(1) Compiled and Interpreted :
•Usually a computer language is either compiled or
interpreted. But java combines both the
approaches. First java compiler translates the
source code into byte code instructions.
•Bytecodes are not machine instructions so in
second stage, Java Interpreter generates machine
code and execute the code. So we can say that java
is Compiler and Interpreter.
Java Program
Source Code
Java Compiler
Virtual
Machine
Byte Code
Virtual
Machine
Byte Code
Phase – I (Compilation)
Java
Interpreter
Output
Phase – II (Interpretation)
Features to Java
(2) Platform Independent and Portable :
•Java programs can be moved easily from one
system to another, anywhere and anytime. Due to
this reason only the java is the most popular
language on the internet.
•Java is Platform independent because it does not
generates the machine code but it generates a code
for JVM (Java Virtual Machine) so the program can
be run on any machine without any problem.
Features to Java
(3) Object Oriented :
Java is pure Object Oriented Programming
Language. Almost everything in java is an object.
All programs, codes and data always resides inside
the objects and classes.
Features to Java
(4) Secure :
Java is a secure language. It has compile time
and run time checking for data types. On the other
hand java provides the assurance that no viruses
will be communicated with applets. One more
thing is java does not support pointers so no
question of memory address to user.
Features to Java
(5) Distributed :
Java is a language developed for distributed
language for creating application on networks. It
has ability to share both – data and programs. This
will allow the programmers at various remote
locations to work together on a single project.
Features to Java
(6) Simple, Small and Familiar :
Java is simple language because many of the
features are from C and C++. Again it removes
problems from C and C++.
Java is small language because it consist of
only Six packages.
It is familiar because it looks like C++. In other
words we can say “Java is simplified version of C++”.
Features to Java
(7) Multithreaded and Interactive :
Multithreading means handling multiple tasks
simultaneously. Means that we can do more then
one work at a time. E.g. listening music is one work
and download from internet is another work is the
example of Multithreading.
Through java we can develop programs for
interactive systems like cellphones, lcds etc.
Features to Java
(8) High Performance :
•The performance of Java is quite impressive
because it uses compilation and interpretation
both. It gives a very much high performance to the
java programs.
•Java architecture has also reduce the overheads
which also improves the performance.
Features to Java
(9) Dynamic and Extensible:
Java is dynamic language. It is capable of
creating new classes, methods and objects.
Java supports functions written in C or C++
also. This is known as native code. This native code
will bind with the code dynamically.
Java is Extensible because we can define our
own classes also which can be added to the pure
java language.
Comparison between C and Java
(1) Java does not have struct and union
(2) Java does not have pointers
(3) Java does not have sizeof or typedef
(4) Java does not have preprocessors like #include,
#define etc.
(5) Java has new operator instanceof
(6) Java has various features of OOP which are not
there in C
Comparison between C++ and Java
(1) Java does not support Operator Overloading
(2) Java does not have template classes
(3) Java does not support multiple inheritance
instead of that it uses interface
(4) Java does not support global variable declaration
(5) Java does not use destructor instead of that it
uses finalize() method
(6) There are no header files in java
C++
Summary of C, C++ and Java
C Java
Process of Building and Running Java Application
Text Editor
Java Source Code
javac (Compiler)
Java class file
java (Interpreter)
Java Program Output
JAVA
ENVIRONMENT
Three Components
• JDK - Java Development Kit
• JVM – Java Virtual Machine
• JRE – Java Runtime Environment
JDK
• Writing Java applets and applications needs
development tools like JDK.
• Java developers are initially presented with two JDK tools,
java and javac.
• Both are run from the command prompt.
• It's easy for both new and experienced programmers to
get started.
JDK Architecture
JRE
• JRE is an acronym for Java Runtime Environment.
• It is also written as Java RTE.
• The Java Runtime Environment is a set of
software tools
• It physically exists.
• It contains a set of libraries + other files that
JVM uses at runtime.
JRE Architecture
JVM
• Java compiler produces code for a Virtual Machine
known as Java Virtual Machine.
• JVM converts Java byte code into machines
language.
• JVM is a engine that provides runtime
environment to drive the Java Code or
applications.
Java programming Introduction | Java basic architecture
Java programming Introduction | Java basic architecture
JVM Functions
Loads Code
Verifie
s
Code
Execute
s
Runtime
Environmen
Java programming Introduction | Java basic architecture
Popular Java Editors
• To write your Java programs, you will need a text editor. There
are even more sophisticated IDEs available in the market. −
• Notepad − On Windows machine, you can use any simple text
editor like Notepad (Recommended for this tutorial), TextPad.
• Netbeans − A Java IDE that is open-source and free which can
be downloaded from https://www.netbeans.org/index.html.
• Eclipse − A Java IDE developed by the eclipse open-source
community and can be downloaded from
https://www.eclipse.org/.

More Related Content

Similar to Java programming Introduction | Java basic architecture (20)

java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
vikasbagra9887
 
Chapter-1 Introduction.pptx
Chapter-1 Introduction.pptxChapter-1 Introduction.pptx
Chapter-1 Introduction.pptx
SumanBhandari40
 
Unit-IV_Introduction to Java.pdf
Unit-IV_Introduction to Java.pdfUnit-IV_Introduction to Java.pdf
Unit-IV_Introduction to Java.pdf
Assistant Professor, Shri Shivaji Science College, Amravati
 
Java ppt-class_Introduction_class_Objects.ppt
Java ppt-class_Introduction_class_Objects.pptJava ppt-class_Introduction_class_Objects.ppt
Java ppt-class_Introduction_class_Objects.ppt
VGaneshKarthikeyan
 
Java programming Evolution-OverviewOfJava.pdf
Java programming Evolution-OverviewOfJava.pdfJava programming Evolution-OverviewOfJava.pdf
Java programming Evolution-OverviewOfJava.pdf
AbhishekSingh961152
 
Java Basic.pdf
Java Basic.pdfJava Basic.pdf
Java Basic.pdf
TechSearchWeb
 
Java2020 programming basics and fundamentals
Java2020 programming basics and fundamentalsJava2020 programming basics and fundamentals
Java2020 programming basics and fundamentals
swecsaleem
 
Java Programming
Java ProgrammingJava Programming
Java Programming
Elizabeth alexander
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...
Mr. Akaash
 
ILOVE you11111111111111111111111111.pptx
ILOVE you11111111111111111111111111.pptxILOVE you11111111111111111111111111.pptx
ILOVE you11111111111111111111111111.pptx
RobertCarreonBula
 
Ch2
Ch2Ch2
Ch2
Uğurcan Uzer
 
Java 2 computer science.pptx
Java 2 computer science.pptxJava 2 computer science.pptx
Java 2 computer science.pptx
MUHAMMED MASHAHIL PUKKUNNUMMAL
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
DevaKumari Vijay
 
java basics concepts and the keywords needed
java basics concepts and the keywords neededjava basics concepts and the keywords needed
java basics concepts and the keywords needed
PriyadharshiniG41
 
Java technology is widely used currently. Let's start learning of java from b...
Java technology is widely used currently. Let's start learning of java from b...Java technology is widely used currently. Let's start learning of java from b...
Java technology is widely used currently. Let's start learning of java from b...
aliblackcat76
 
Java ppt-class_basic data types methods definitions
Java ppt-class_basic data types methods definitionsJava ppt-class_basic data types methods definitions
Java ppt-class_basic data types methods definitions
ganeshkarthy
 
TechSearchWeb.pdf
TechSearchWeb.pdfTechSearchWeb.pdf
TechSearchWeb.pdf
TechSearchWeb
 
Technology Tutorial.pdf
Technology Tutorial.pdfTechnology Tutorial.pdf
Technology Tutorial.pdf
TechSearchWeb
 
Java ms harsha
Java ms harshaJava ms harsha
Java ms harsha
Harsha Batra
 
Java
JavaJava
Java
Harry Potter
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
vikasbagra9887
 
Chapter-1 Introduction.pptx
Chapter-1 Introduction.pptxChapter-1 Introduction.pptx
Chapter-1 Introduction.pptx
SumanBhandari40
 
Java ppt-class_Introduction_class_Objects.ppt
Java ppt-class_Introduction_class_Objects.pptJava ppt-class_Introduction_class_Objects.ppt
Java ppt-class_Introduction_class_Objects.ppt
VGaneshKarthikeyan
 
Java programming Evolution-OverviewOfJava.pdf
Java programming Evolution-OverviewOfJava.pdfJava programming Evolution-OverviewOfJava.pdf
Java programming Evolution-OverviewOfJava.pdf
AbhishekSingh961152
 
Java2020 programming basics and fundamentals
Java2020 programming basics and fundamentalsJava2020 programming basics and fundamentals
Java2020 programming basics and fundamentals
swecsaleem
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...
Mr. Akaash
 
ILOVE you11111111111111111111111111.pptx
ILOVE you11111111111111111111111111.pptxILOVE you11111111111111111111111111.pptx
ILOVE you11111111111111111111111111.pptx
RobertCarreonBula
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
DevaKumari Vijay
 
java basics concepts and the keywords needed
java basics concepts and the keywords neededjava basics concepts and the keywords needed
java basics concepts and the keywords needed
PriyadharshiniG41
 
Java technology is widely used currently. Let's start learning of java from b...
Java technology is widely used currently. Let's start learning of java from b...Java technology is widely used currently. Let's start learning of java from b...
Java technology is widely used currently. Let's start learning of java from b...
aliblackcat76
 
Java ppt-class_basic data types methods definitions
Java ppt-class_basic data types methods definitionsJava ppt-class_basic data types methods definitions
Java ppt-class_basic data types methods definitions
ganeshkarthy
 
Technology Tutorial.pdf
Technology Tutorial.pdfTechnology Tutorial.pdf
Technology Tutorial.pdf
TechSearchWeb
 

Recently uploaded (20)

Computer_vision-photometric_image_formation.pdf
Computer_vision-photometric_image_formation.pdfComputer_vision-photometric_image_formation.pdf
Computer_vision-photometric_image_formation.pdf
kumarprem6767merp
 
11th International Conference on Data Mining (DaMi 2025)
11th International Conference on Data Mining (DaMi 2025)11th International Conference on Data Mining (DaMi 2025)
11th International Conference on Data Mining (DaMi 2025)
kjim477n
 
Introduction to AI agent development with MCP
Introduction to AI agent development with MCPIntroduction to AI agent development with MCP
Introduction to AI agent development with MCP
Dori Waldman
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
djiceramil
 
Artificial Power 2025 raport krajobrazowy
Artificial Power 2025 raport krajobrazowyArtificial Power 2025 raport krajobrazowy
Artificial Power 2025 raport krajobrazowy
dominikamizerska1
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
djiceramil
 
Structure of OS ppt Structure of OsS ppt
Structure of OS ppt Structure of OsS pptStructure of OS ppt Structure of OsS ppt
Structure of OS ppt Structure of OsS ppt
Wahajch
 
Rearchitecturing a 9-year-old legacy Laravel application.pdf
Rearchitecturing a 9-year-old legacy Laravel application.pdfRearchitecturing a 9-year-old legacy Laravel application.pdf
Rearchitecturing a 9-year-old legacy Laravel application.pdf
Takumi Amitani
 
Tree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbb
Tree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbbTree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbb
Tree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbb
RATNANITINPATIL
 
operationg systemsdocumentmemorymanagement
operationg systemsdocumentmemorymanagementoperationg systemsdocumentmemorymanagement
operationg systemsdocumentmemorymanagement
SNIGDHAAPPANABHOTLA
 
22PCOAM16 _ML_Unit 3 Notes & Question bank
22PCOAM16 _ML_Unit 3 Notes & Question bank22PCOAM16 _ML_Unit 3 Notes & Question bank
22PCOAM16 _ML_Unit 3 Notes & Question bank
Guru Nanak Technical Institutions
 
Development of Portable Biomass Briquetting Machine (S, A & D)-1.pptx
Development of Portable Biomass Briquetting Machine (S, A & D)-1.pptxDevelopment of Portable Biomass Briquetting Machine (S, A & D)-1.pptx
Development of Portable Biomass Briquetting Machine (S, A & D)-1.pptx
aniket862935
 
Third Review PPT that consists of the project d etails like abstract.
Third Review PPT that consists of the project d etails like abstract.Third Review PPT that consists of the project d etails like abstract.
Third Review PPT that consists of the project d etails like abstract.
Sowndarya6
 
FINAL 2013 Module 20 Corrosion Control and Sequestering PPT Slides.pptx
FINAL 2013 Module 20 Corrosion Control and Sequestering PPT Slides.pptxFINAL 2013 Module 20 Corrosion Control and Sequestering PPT Slides.pptx
FINAL 2013 Module 20 Corrosion Control and Sequestering PPT Slides.pptx
kippcam
 
Airport_Substation_With_Diagrams (2).pptx
Airport_Substation_With_Diagrams (2).pptxAirport_Substation_With_Diagrams (2).pptx
Airport_Substation_With_Diagrams (2).pptx
BibekMedhi2
 
chemistry investigatory project for class 12
chemistry investigatory project for class 12chemistry investigatory project for class 12
chemistry investigatory project for class 12
Susis10
 
Top Cite Articles- International Journal on Soft Computing, Artificial Intell...
Top Cite Articles- International Journal on Soft Computing, Artificial Intell...Top Cite Articles- International Journal on Soft Computing, Artificial Intell...
Top Cite Articles- International Journal on Soft Computing, Artificial Intell...
ijscai
 
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghjfHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
yadavshivank2006
 
Irja Straus - Beyond Pass and Fail - DevTalks.pdf
Irja Straus - Beyond Pass and Fail - DevTalks.pdfIrja Straus - Beyond Pass and Fail - DevTalks.pdf
Irja Straus - Beyond Pass and Fail - DevTalks.pdf
Irja Straus
 
SEW make Brake BE05 – BE30 Brake – Repair Kit
SEW make Brake BE05 – BE30 Brake – Repair KitSEW make Brake BE05 – BE30 Brake – Repair Kit
SEW make Brake BE05 – BE30 Brake – Repair Kit
projectultramechanix
 
Computer_vision-photometric_image_formation.pdf
Computer_vision-photometric_image_formation.pdfComputer_vision-photometric_image_formation.pdf
Computer_vision-photometric_image_formation.pdf
kumarprem6767merp
 
11th International Conference on Data Mining (DaMi 2025)
11th International Conference on Data Mining (DaMi 2025)11th International Conference on Data Mining (DaMi 2025)
11th International Conference on Data Mining (DaMi 2025)
kjim477n
 
Introduction to AI agent development with MCP
Introduction to AI agent development with MCPIntroduction to AI agent development with MCP
Introduction to AI agent development with MCP
Dori Waldman
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
djiceramil
 
Artificial Power 2025 raport krajobrazowy
Artificial Power 2025 raport krajobrazowyArtificial Power 2025 raport krajobrazowy
Artificial Power 2025 raport krajobrazowy
dominikamizerska1
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
djiceramil
 
Structure of OS ppt Structure of OsS ppt
Structure of OS ppt Structure of OsS pptStructure of OS ppt Structure of OsS ppt
Structure of OS ppt Structure of OsS ppt
Wahajch
 
Rearchitecturing a 9-year-old legacy Laravel application.pdf
Rearchitecturing a 9-year-old legacy Laravel application.pdfRearchitecturing a 9-year-old legacy Laravel application.pdf
Rearchitecturing a 9-year-old legacy Laravel application.pdf
Takumi Amitani
 
Tree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbb
Tree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbbTree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbb
Tree_Traversals.pptbbbbbbbbbbbbbbbbbbbbbbbbb
RATNANITINPATIL
 
operationg systemsdocumentmemorymanagement
operationg systemsdocumentmemorymanagementoperationg systemsdocumentmemorymanagement
operationg systemsdocumentmemorymanagement
SNIGDHAAPPANABHOTLA
 
Development of Portable Biomass Briquetting Machine (S, A & D)-1.pptx
Development of Portable Biomass Briquetting Machine (S, A & D)-1.pptxDevelopment of Portable Biomass Briquetting Machine (S, A & D)-1.pptx
Development of Portable Biomass Briquetting Machine (S, A & D)-1.pptx
aniket862935
 
Third Review PPT that consists of the project d etails like abstract.
Third Review PPT that consists of the project d etails like abstract.Third Review PPT that consists of the project d etails like abstract.
Third Review PPT that consists of the project d etails like abstract.
Sowndarya6
 
FINAL 2013 Module 20 Corrosion Control and Sequestering PPT Slides.pptx
FINAL 2013 Module 20 Corrosion Control and Sequestering PPT Slides.pptxFINAL 2013 Module 20 Corrosion Control and Sequestering PPT Slides.pptx
FINAL 2013 Module 20 Corrosion Control and Sequestering PPT Slides.pptx
kippcam
 
Airport_Substation_With_Diagrams (2).pptx
Airport_Substation_With_Diagrams (2).pptxAirport_Substation_With_Diagrams (2).pptx
Airport_Substation_With_Diagrams (2).pptx
BibekMedhi2
 
chemistry investigatory project for class 12
chemistry investigatory project for class 12chemistry investigatory project for class 12
chemistry investigatory project for class 12
Susis10
 
Top Cite Articles- International Journal on Soft Computing, Artificial Intell...
Top Cite Articles- International Journal on Soft Computing, Artificial Intell...Top Cite Articles- International Journal on Soft Computing, Artificial Intell...
Top Cite Articles- International Journal on Soft Computing, Artificial Intell...
ijscai
 
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghjfHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
yadavshivank2006
 
Irja Straus - Beyond Pass and Fail - DevTalks.pdf
Irja Straus - Beyond Pass and Fail - DevTalks.pdfIrja Straus - Beyond Pass and Fail - DevTalks.pdf
Irja Straus - Beyond Pass and Fail - DevTalks.pdf
Irja Straus
 
SEW make Brake BE05 – BE30 Brake – Repair Kit
SEW make Brake BE05 – BE30 Brake – Repair KitSEW make Brake BE05 – BE30 Brake – Repair Kit
SEW make Brake BE05 – BE30 Brake – Repair Kit
projectultramechanix
 
Ad

Java programming Introduction | Java basic architecture

  • 1. Fundamental of Java Programming Introduction to Java
  • 2. Introduction to Java Java is a general purpose object oriented Programming language. It is developed by Sun Microsystems of USA in 1991. Its original name was Oak given by James Gosling, who is one of the inventors of the language. Java was initially Developed for Softwares for Consumer Electronics Devices like TVs, VCRs, and others.
  • 3. The father of Java – James Gosling
  • 4. Introduction to Java Java has taken the most popular languages of that time i.e. C and C++ as base by considering its various features and removing their limitations. With this they have develop a most simple, reliable, portable and powerful language.
  • 5. History of Java Year Development 1990 Sun Microsystems decided to develop a special software for consumer electronics devices. A Team has been formed to undertake this task. James Gosling was the head of that team. 1991 The team announce a new language called “Oak” 1992 The team known as “Green Project” team, have demonstrated the use of language on a list of home appliances. 1993 World Wide Web (WWW) has given support to Green Project Team and they have started thinking for development of Web Applets 1994 A new Web browser called HotJava has been developed by the Team to run applets. 1995 Oak was rename to Java due to some legal problems. 1996 Sun release Java Development Kit 1.0 (JDK 1.0)
  • 6. History of Java Year Development 1997 Sun release JDK 1.1 1998 Sun release Java 2 with JDK 1.2 1999 Sun release J2SE and J2EE 2000 JDK 1.3 2002 JDK 1.4 2004 JDK 1.5 2006 JDK 1.6
  • 7. Features to Java Java has various features which makes it simple, secure and compact. They are as follows: (1) Compiled and Interpreted (2) Platform Independent and Portable (3) Object Oriented (4) Secure (5) Distributed (6) Familiar, Simple and Small (7) Multithreaded and Interactive (8) High Performance (9) Dynamic and Extensible
  • 8. Features to Java (1) Compiled and Interpreted : •Usually a computer language is either compiled or interpreted. But java combines both the approaches. First java compiler translates the source code into byte code instructions. •Bytecodes are not machine instructions so in second stage, Java Interpreter generates machine code and execute the code. So we can say that java is Compiler and Interpreter.
  • 9. Java Program Source Code Java Compiler Virtual Machine Byte Code Virtual Machine Byte Code Phase – I (Compilation) Java Interpreter Output Phase – II (Interpretation)
  • 10. Features to Java (2) Platform Independent and Portable : •Java programs can be moved easily from one system to another, anywhere and anytime. Due to this reason only the java is the most popular language on the internet. •Java is Platform independent because it does not generates the machine code but it generates a code for JVM (Java Virtual Machine) so the program can be run on any machine without any problem.
  • 11. Features to Java (3) Object Oriented : Java is pure Object Oriented Programming Language. Almost everything in java is an object. All programs, codes and data always resides inside the objects and classes.
  • 12. Features to Java (4) Secure : Java is a secure language. It has compile time and run time checking for data types. On the other hand java provides the assurance that no viruses will be communicated with applets. One more thing is java does not support pointers so no question of memory address to user.
  • 13. Features to Java (5) Distributed : Java is a language developed for distributed language for creating application on networks. It has ability to share both – data and programs. This will allow the programmers at various remote locations to work together on a single project.
  • 14. Features to Java (6) Simple, Small and Familiar : Java is simple language because many of the features are from C and C++. Again it removes problems from C and C++. Java is small language because it consist of only Six packages. It is familiar because it looks like C++. In other words we can say “Java is simplified version of C++”.
  • 15. Features to Java (7) Multithreaded and Interactive : Multithreading means handling multiple tasks simultaneously. Means that we can do more then one work at a time. E.g. listening music is one work and download from internet is another work is the example of Multithreading. Through java we can develop programs for interactive systems like cellphones, lcds etc.
  • 16. Features to Java (8) High Performance : •The performance of Java is quite impressive because it uses compilation and interpretation both. It gives a very much high performance to the java programs. •Java architecture has also reduce the overheads which also improves the performance.
  • 17. Features to Java (9) Dynamic and Extensible: Java is dynamic language. It is capable of creating new classes, methods and objects. Java supports functions written in C or C++ also. This is known as native code. This native code will bind with the code dynamically. Java is Extensible because we can define our own classes also which can be added to the pure java language.
  • 18. Comparison between C and Java (1) Java does not have struct and union (2) Java does not have pointers (3) Java does not have sizeof or typedef (4) Java does not have preprocessors like #include, #define etc. (5) Java has new operator instanceof (6) Java has various features of OOP which are not there in C
  • 19. Comparison between C++ and Java (1) Java does not support Operator Overloading (2) Java does not have template classes (3) Java does not support multiple inheritance instead of that it uses interface (4) Java does not support global variable declaration (5) Java does not use destructor instead of that it uses finalize() method (6) There are no header files in java
  • 20. C++ Summary of C, C++ and Java C Java
  • 21. Process of Building and Running Java Application Text Editor Java Source Code javac (Compiler) Java class file java (Interpreter) Java Program Output
  • 23. Three Components • JDK - Java Development Kit • JVM – Java Virtual Machine • JRE – Java Runtime Environment
  • 24. JDK • Writing Java applets and applications needs development tools like JDK. • Java developers are initially presented with two JDK tools, java and javac. • Both are run from the command prompt. • It's easy for both new and experienced programmers to get started.
  • 26. JRE • JRE is an acronym for Java Runtime Environment. • It is also written as Java RTE. • The Java Runtime Environment is a set of software tools • It physically exists. • It contains a set of libraries + other files that JVM uses at runtime.
  • 28. JVM • Java compiler produces code for a Virtual Machine known as Java Virtual Machine. • JVM converts Java byte code into machines language. • JVM is a engine that provides runtime environment to drive the Java Code or applications.
  • 33. Popular Java Editors • To write your Java programs, you will need a text editor. There are even more sophisticated IDEs available in the market. − • Notepad − On Windows machine, you can use any simple text editor like Notepad (Recommended for this tutorial), TextPad. • Netbeans − A Java IDE that is open-source and free which can be downloaded from https://www.netbeans.org/index.html. • Eclipse − A Java IDE developed by the eclipse open-source community and can be downloaded from https://www.eclipse.org/.