SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
1
Object Oriented
Programming-Java
OOP vs POP, Java,
Java Technologies,
Prepared by: Said H Said
The University of Dodoma
2
Procedural Oriented
Programing (POP)
 Program is divided into small parts called
functions
 Importance is not given to data but to
functions as well as sequence of actions to
be done
 Does not have any access specifies
 In POP, Data can move freely from function
to function in the system
Prepared by: Said H Said
The University of Dodoma
3
POP Cont…
 To add new data and function in POP is not
so easy
 In POP, Most function uses Global data for
sharing that can be accessed freely from
function to function in the system
 POP does not have any proper way for hiding
data so it is less secure
 In POP, Overloading is not possible
 Example of POPL are : C, VB, FORTRAN,
Pascal
Prepared by: Said H Said
The University of Dodoma
4
Object Oriented
programing(OOP)
 Program is divided into parts called objects
 Importance is given to data rather than
procedures or functions to mimic real world
realm
 OOP has access specifies named Public,
Private, Protected, etc
 In OOP, objects can move and communicate
with each other through member
functions/methods
Prepared by: Said H Said
The University of Dodoma
5
OOP cont…..
 OOP provides an easy way to add new data
and function/methods
 In OOP, data cannot move easily from function
to function, it can be kept public or private so we
can control the access of data
 OOP provides Data Hiding so provides more
security
 In OOP, overloading is possible in the form of
Function Overloading and Operator Overloading
 Example of OOP are : C++, JAVA, VB.NET,
C#.NET Prepared by: Said H Said
The University of Dodoma
6
POP SRUCTURE……
Main Function
Function 1 Function 2 Function 3
Function 2 Function 5
Function N
Prepared by: Said H Said
The University of Dodoma
7
OOP SRUCTURE……
Class 1 {
Data
Methods
}
Class 2 {
Data
Methods
}
Class n {
Data
Methods
}
Prepared by: Said H Said
The University of Dodoma
Java
 General purpose programming language
 Is simple
 Is scalable
 Is object oriented
 Is similar to C and C++
8
Prepared by: Said H Said
The University of Dodoma
9
Java
 A Programming Language and a Platform
 Java Platform
 Java Virtual Machine (Java VM)
 Java Application Programming Interface
Prepared by: Said H Said
The University of Dodoma
10
Java
 It is Platform Independent (Write Once Run
Anywhere)
Prepared by: Said H Said
The University of Dodoma
11
Advantages of Java
 Easy to learn, Familiar C++ like syntax
 Pure Object Oriented Language
 Extensive API, which means that
programmers write lesser amount of code
 Extensive Documentation
 Faster Application Development because of
code re-use
 Platform Independence
 Automatic Garbage Collection
Prepared by: Said H Said
The University of Dodoma
12
History of Java
 Project Green by Sun Microsystems to create
a pure object oriented language based on
C++, to overcome the limitations and
complexities of C++ (1990)
 Aimed at embedded systems in consumer
electronic devices (interactive television,
VCR, washing machines, etc.)
 Originally named ‘Oak’
Prepared by: Said H Said
The University of Dodoma
13
History of Java
 Failed to win recognition in embedded
systems and embedded systems were not
making a rapid progress
 During the same period world wide web
(www) was going through an exponential
growth
 Oak was aimed at supporting interactive web
pages together with the development of a
new web browser, Web Runner (1994)
Prepared by: Said H Said
The University of Dodoma
14
History of Java
 ‘Oak’ renamed ‘Java’ and ‘Web Runner’
renamed ‘Hot Java’
 Formal Announcement of Java Language
and Hot Java browser in Sun World ’95
 Commercial web browsers starting with
Netscape begin supporting Java
 Later Java evolved into other technologies
like Java applets (interactive web content)
Prepared by: Said H Said
The University of Dodoma
15
Use of Java
 Desktop Applications such as acrobat reader,
media player, antivirus etc.
 Web Applications such as irctc.co.in,
javatpoint.com etc.
 Enterprise Applications such as banking
applications.
 Mobile
 Embedded System
 Smart Card
 Robotics
 Games etc.
Prepared by: Said H Said
The University of Dodoma
Prepared by: Said H Said The University of
Dodoma
16
Different Java Technologies
 JVM (Java Virtual Machine): is an abstract machine. It
is a specification that provides runtime environment in
which java bytecode can be executed.
 JVMs are available for many hardware and software
platforms. JVM, JRE and JDK are platform dependent
because configuration of each OS differs. But, Java is
platform independent.
 The JVM performs following main tasks:
 Loads code
 Verifies code
 Executes code
 Provides runtime environment
Prepared by: Said H Said
The University of Dodoma
17
Different Java Technologies
 JRE: is an acronym for Java Runtime Environment.
 It is used to provide runtime environment.
 It is the implementation of JVM.
 It physically exists.
 It contains set of libraries + other files that JVM uses at
runtime.
 Implementation of JVMs are also actively released
by other companies besides Sun Micro Systems.
Prepared by: Said H Said
The University of Dodoma
18
Different Java Technologies
 JDK is an acronym for Java Development Kit.
 It physically exists.
 It contains JRE + development tools.
Prepared by: Said H Said
The University of Dodoma
Prepared by: Said H Said
The University of Dodoma
19
Different Java Technologies
Prepared by: Said H Said
The University of Dodoma
20
Different Java Technologies
 IDE’s (Integrated Development Environments): are
tools used for efficient software development
 Different Components of an IDE :
 Editor
 Linker
 Compiler
 Debugger
 All the different components are seamlessly
integrated in an IDE making it easy to use
Prepared by: Said H Said
The University of Dodoma
21
IDEs cont…
 For different programming languages,
different IDE’s are available
 Java Language :
JBuilder, Kawa, NetBeans, eclipse etc.
 C Language :
Borland C, Turbo C, etc.
 IDE’s have capabilities different from each
other and one has to learn the use of an IDE
to get the maximum return
22
Compilation and Execution of
a Java Program
 Create a source file (e.g. :- a file named
“HelloWorld.java”) and type in the source code.
/**
* The HelloWorld class implements an application that
* displays "Hello World!" to the standard output.
*/
public class HelloWorld {
public static void main(String[] args) {
// Display "Hello World!"
System.out.println("Hello World!");
}
}
Prepared by: Said H Said
The University of Dodoma
23
Compilation and Execution of
a Java Program
 Compile the source file
 Use the Java compiler :
javac HelloWorld.java
 A byte code file (i.e. a file understandable by the
Java Virtual Machine) is created
 Run the program contained in the byte code
file
 Use the command :
java HelloWorld
Prepared by: Said H Said
The University of Dodoma

Contenu connexe

Similaire à Lecture_01.pdf

Introduction to java
Introduction to javaIntroduction to java
Introduction to javashwanjava
 
CSE215_Module_01_Introduction.ppt
CSE215_Module_01_Introduction.pptCSE215_Module_01_Introduction.ppt
CSE215_Module_01_Introduction.pptRashedurRahman18
 
Portable Code Compiler
Portable Code CompilerPortable Code Compiler
Portable Code Compilerijtsrd
 
A CASE STUDY JAVA IS SECURE PROGRAMMING LANGUAGE
A CASE STUDY  JAVA IS SECURE PROGRAMMING LANGUAGEA CASE STUDY  JAVA IS SECURE PROGRAMMING LANGUAGE
A CASE STUDY JAVA IS SECURE PROGRAMMING LANGUAGENathan Mathis
 
USES of java.pptx
USES of java.pptxUSES of java.pptx
USES of java.pptxXanGwaps
 
Unesco Presentation
Unesco PresentationUnesco Presentation
Unesco PresentationUmesh
 
Android_Studio_Structure.docx
Android_Studio_Structure.docxAndroid_Studio_Structure.docx
Android_Studio_Structure.docxKNANTHINIMCA
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxSuganthiDPSGRKCW
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...MCM COmpetitive Classes
 
1.INTRODUCTION TO JAVA_2022 MB.ppt .
1.INTRODUCTION TO JAVA_2022 MB.ppt      .1.INTRODUCTION TO JAVA_2022 MB.ppt      .
1.INTRODUCTION TO JAVA_2022 MB.ppt .happycocoman
 
Introduction To Mobile Application Development
Introduction To Mobile Application DevelopmentIntroduction To Mobile Application Development
Introduction To Mobile Application DevelopmentSyed Absar
 
15 Top reasons to choose Java for Backend Development
15 Top reasons to choose Java for Backend Development15 Top reasons to choose Java for Backend Development
15 Top reasons to choose Java for Backend DevelopmentYour Team in India
 
Analysis Of The Original Version Of Java
Analysis Of The Original Version Of JavaAnalysis Of The Original Version Of Java
Analysis Of The Original Version Of JavaAmanda Brady
 
13 Best Mobile IDEs for Android.pdf
13 Best Mobile IDEs for Android.pdf13 Best Mobile IDEs for Android.pdf
13 Best Mobile IDEs for Android.pdfiDataScientists
 

Similaire à Lecture_01.pdf (20)

Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java Programming Basics
Java Programming BasicsJava Programming Basics
Java Programming Basics
 
CSE215_Module_01_Introduction.ppt
CSE215_Module_01_Introduction.pptCSE215_Module_01_Introduction.ppt
CSE215_Module_01_Introduction.ppt
 
Portable Code Compiler
Portable Code CompilerPortable Code Compiler
Portable Code Compiler
 
A CASE STUDY JAVA IS SECURE PROGRAMMING LANGUAGE
A CASE STUDY  JAVA IS SECURE PROGRAMMING LANGUAGEA CASE STUDY  JAVA IS SECURE PROGRAMMING LANGUAGE
A CASE STUDY JAVA IS SECURE PROGRAMMING LANGUAGE
 
USES of java.pptx
USES of java.pptxUSES of java.pptx
USES of java.pptx
 
130700548484460000
130700548484460000130700548484460000
130700548484460000
 
JAVA FEATURES
JAVA FEATURESJAVA FEATURES
JAVA FEATURES
 
Unesco Presentation
Unesco PresentationUnesco Presentation
Unesco Presentation
 
Android_Studio_Structure.docx
Android_Studio_Structure.docxAndroid_Studio_Structure.docx
Android_Studio_Structure.docx
 
Java presentation
Java presentationJava presentation
Java presentation
 
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptxJAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA PROGRAMMING-Unit I - Final PPT.pptx
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...
 
gopal hp
gopal hpgopal hp
gopal hp
 
java notes.docx
java notes.docxjava notes.docx
java notes.docx
 
1.INTRODUCTION TO JAVA_2022 MB.ppt .
1.INTRODUCTION TO JAVA_2022 MB.ppt      .1.INTRODUCTION TO JAVA_2022 MB.ppt      .
1.INTRODUCTION TO JAVA_2022 MB.ppt .
 
Introduction To Mobile Application Development
Introduction To Mobile Application DevelopmentIntroduction To Mobile Application Development
Introduction To Mobile Application Development
 
15 Top reasons to choose Java for Backend Development
15 Top reasons to choose Java for Backend Development15 Top reasons to choose Java for Backend Development
15 Top reasons to choose Java for Backend Development
 
Analysis Of The Original Version Of Java
Analysis Of The Original Version Of JavaAnalysis Of The Original Version Of Java
Analysis Of The Original Version Of Java
 
13 Best Mobile IDEs for Android.pdf
13 Best Mobile IDEs for Android.pdf13 Best Mobile IDEs for Android.pdf
13 Best Mobile IDEs for Android.pdf
 

Dernier

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Dernier (20)

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 

Lecture_01.pdf

  • 1. 1 Object Oriented Programming-Java OOP vs POP, Java, Java Technologies, Prepared by: Said H Said The University of Dodoma
  • 2. 2 Procedural Oriented Programing (POP)  Program is divided into small parts called functions  Importance is not given to data but to functions as well as sequence of actions to be done  Does not have any access specifies  In POP, Data can move freely from function to function in the system Prepared by: Said H Said The University of Dodoma
  • 3. 3 POP Cont…  To add new data and function in POP is not so easy  In POP, Most function uses Global data for sharing that can be accessed freely from function to function in the system  POP does not have any proper way for hiding data so it is less secure  In POP, Overloading is not possible  Example of POPL are : C, VB, FORTRAN, Pascal Prepared by: Said H Said The University of Dodoma
  • 4. 4 Object Oriented programing(OOP)  Program is divided into parts called objects  Importance is given to data rather than procedures or functions to mimic real world realm  OOP has access specifies named Public, Private, Protected, etc  In OOP, objects can move and communicate with each other through member functions/methods Prepared by: Said H Said The University of Dodoma
  • 5. 5 OOP cont…..  OOP provides an easy way to add new data and function/methods  In OOP, data cannot move easily from function to function, it can be kept public or private so we can control the access of data  OOP provides Data Hiding so provides more security  In OOP, overloading is possible in the form of Function Overloading and Operator Overloading  Example of OOP are : C++, JAVA, VB.NET, C#.NET Prepared by: Said H Said The University of Dodoma
  • 6. 6 POP SRUCTURE…… Main Function Function 1 Function 2 Function 3 Function 2 Function 5 Function N Prepared by: Said H Said The University of Dodoma
  • 7. 7 OOP SRUCTURE…… Class 1 { Data Methods } Class 2 { Data Methods } Class n { Data Methods } Prepared by: Said H Said The University of Dodoma
  • 8. Java  General purpose programming language  Is simple  Is scalable  Is object oriented  Is similar to C and C++ 8 Prepared by: Said H Said The University of Dodoma
  • 9. 9 Java  A Programming Language and a Platform  Java Platform  Java Virtual Machine (Java VM)  Java Application Programming Interface Prepared by: Said H Said The University of Dodoma
  • 10. 10 Java  It is Platform Independent (Write Once Run Anywhere) Prepared by: Said H Said The University of Dodoma
  • 11. 11 Advantages of Java  Easy to learn, Familiar C++ like syntax  Pure Object Oriented Language  Extensive API, which means that programmers write lesser amount of code  Extensive Documentation  Faster Application Development because of code re-use  Platform Independence  Automatic Garbage Collection Prepared by: Said H Said The University of Dodoma
  • 12. 12 History of Java  Project Green by Sun Microsystems to create a pure object oriented language based on C++, to overcome the limitations and complexities of C++ (1990)  Aimed at embedded systems in consumer electronic devices (interactive television, VCR, washing machines, etc.)  Originally named ‘Oak’ Prepared by: Said H Said The University of Dodoma
  • 13. 13 History of Java  Failed to win recognition in embedded systems and embedded systems were not making a rapid progress  During the same period world wide web (www) was going through an exponential growth  Oak was aimed at supporting interactive web pages together with the development of a new web browser, Web Runner (1994) Prepared by: Said H Said The University of Dodoma
  • 14. 14 History of Java  ‘Oak’ renamed ‘Java’ and ‘Web Runner’ renamed ‘Hot Java’  Formal Announcement of Java Language and Hot Java browser in Sun World ’95  Commercial web browsers starting with Netscape begin supporting Java  Later Java evolved into other technologies like Java applets (interactive web content) Prepared by: Said H Said The University of Dodoma
  • 15. 15 Use of Java  Desktop Applications such as acrobat reader, media player, antivirus etc.  Web Applications such as irctc.co.in, javatpoint.com etc.  Enterprise Applications such as banking applications.  Mobile  Embedded System  Smart Card  Robotics  Games etc. Prepared by: Said H Said The University of Dodoma
  • 16. Prepared by: Said H Said The University of Dodoma 16 Different Java Technologies  JVM (Java Virtual Machine): is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed.  JVMs are available for many hardware and software platforms. JVM, JRE and JDK are platform dependent because configuration of each OS differs. But, Java is platform independent.  The JVM performs following main tasks:  Loads code  Verifies code  Executes code  Provides runtime environment Prepared by: Said H Said The University of Dodoma
  • 17. 17 Different Java Technologies  JRE: is an acronym for Java Runtime Environment.  It is used to provide runtime environment.  It is the implementation of JVM.  It physically exists.  It contains set of libraries + other files that JVM uses at runtime.  Implementation of JVMs are also actively released by other companies besides Sun Micro Systems. Prepared by: Said H Said The University of Dodoma
  • 18. 18 Different Java Technologies  JDK is an acronym for Java Development Kit.  It physically exists.  It contains JRE + development tools. Prepared by: Said H Said The University of Dodoma
  • 19. Prepared by: Said H Said The University of Dodoma 19 Different Java Technologies
  • 20. Prepared by: Said H Said The University of Dodoma 20 Different Java Technologies  IDE’s (Integrated Development Environments): are tools used for efficient software development  Different Components of an IDE :  Editor  Linker  Compiler  Debugger  All the different components are seamlessly integrated in an IDE making it easy to use
  • 21. Prepared by: Said H Said The University of Dodoma 21 IDEs cont…  For different programming languages, different IDE’s are available  Java Language : JBuilder, Kawa, NetBeans, eclipse etc.  C Language : Borland C, Turbo C, etc.  IDE’s have capabilities different from each other and one has to learn the use of an IDE to get the maximum return
  • 22. 22 Compilation and Execution of a Java Program  Create a source file (e.g. :- a file named “HelloWorld.java”) and type in the source code. /** * The HelloWorld class implements an application that * displays "Hello World!" to the standard output. */ public class HelloWorld { public static void main(String[] args) { // Display "Hello World!" System.out.println("Hello World!"); } } Prepared by: Said H Said The University of Dodoma
  • 23. 23 Compilation and Execution of a Java Program  Compile the source file  Use the Java compiler : javac HelloWorld.java  A byte code file (i.e. a file understandable by the Java Virtual Machine) is created  Run the program contained in the byte code file  Use the command : java HelloWorld Prepared by: Said H Said The University of Dodoma