The popular object-oriented languages are Java, C#, PHP, Python, C++, etc. The main aim of object-oriented programming is to implement real-world entities.
2. Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
2
Java as Object Oriented
Programming Language-
Overview
- Ms. Shilpa Jadhao
3. History of JAVA Language…
• Java language developed by company Sun
Microsystems and the creator is James
Gosling.(sun->Stanford university network)
• Group of 4 students at Stanford university
• Problem : create one remote control which
can access all electronics appliances.
• Contacted James, given name Green,
launched in 1992.
• Vinod Ghosala was one of them 4 (Indian)
• Based on concept of remote, decided to have
platform independent language.. Developed
language OAK then renamed it as JAVA.
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
4. • Oak is a symbol of strength and chosen as a national tree of many countries like
U.S.A., France, Germany, Romania etc. In 1995, Oak was renamed as "Java"
because it was already a trademark by Oak Technologies.
• The suggested names for the languages were "dynamic", "revolutionary", "Silk",
"jolt", "DNA" “JAVA”etc.
• Java is an island of Indonesia where first coffee was produced (called java
coffee).
• In 1995, Time magazine called Java one of the Ten Best Products of 1995.
• JDK 1.0 released in(January 23, 1996).
• SUN microsystems is now (2010)acquired by Oracle.
• Punch line of JAVA : JAVA is everywhere!
"Write once, run anywhere" (WORA)
"write once, run everywhere" (WORE)
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
History of JAVA Language
5. Versions of Java
1. Java SE ( core java) standard edition
2. Java EE (enterprise edition ) advanced
3. Java ME(micro edition for mobiles ) but now android
is used , java used in android.
• And many more.
• Base is java SE
5
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
6. Introduction to JDK JRE JVM
• Do your computer understands high level language?
• Compiler and Interpreter
• The Compiler of java called as javac converts source code into a
Intermediate file known as Bytecode file.
• The Bytecode file is unique for all types of OS.
• The Interpreter of java (java) converts Bytecode into the
specific OS compatible machine code . This code will vary
according to OS.
6
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
7. Write source code
Compilation done by
JavaC (compiler)
JDK (java development kit)
I/p
O/p
Bytecode
I/p
JVM (Java
Virtual Machine)
= interpreter
Final
O/p
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
Figure 1: Program execution flow in Java
8. •Java Runtime Environment(JRE) :- is part of the
Java Development Kit (JDK). It contains a set of
libraries and tools for developing Java application.
•Java Virtual Machine (JVM)
JVM is set of programs developed by sun Micro System
and supplied as a part of the JDK for reading line by
line line of byte code and it converts into a native
understanding form of operating system.
JRE and JVM
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
9. Figure 2: Java Runtime Environment (JRE)[1]
Figure 3: Java Development Kit (JDK)[1]
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
10. Linking in C
10
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
Figure 4: Linking in C programming
11. Linking in Java
11
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
Figure 5: Linking in Java programming
12. Hello I am JVM !
I Provide runtime environment
to execute bytecode.
Hello I am JDK !
I am physically exists and contains
Java tools, JVM, JRE
Hello I am JRE !
I am the collection of set libraries and
different tools
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
13. Features of JAVA
13
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
Figure 6: Features of Java [1]
14. JVM Architecture…
• Heap: Heap is a part of JVM memory
where objects are allocated. JVM
creates a Class object for each .class
file.
• Stack: it is used for storing temporary
variables.
14
• The class loader reads the .class file
and save the byte code in
the method area.
• Method Area: There is only one
method area in a JVM which is
shared among all the classes. This
holds the class level information of
each .class file.
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
Figure 7: JVM Architecture [2]
15. PC Registers: This keeps the track of which instruction has been executed
and which one is going to be executed. Since instructions are executed by
threads, each thread has a separate PC register.
Native Method stack: A native method can access the runtime data
areas of the virtual machine.
Native Method interface: It enables java code to call or be called by native
applications. Native applications are programs that are specific to the
hardware and OS of a system.
Garbage collection: A class instance is explicitly created by the java code
and after use it is automatically destroyed by garbage collection for memory
management.
JVM Architecture
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
17. THANK YOU
For further information please contact
Prof. Shilpa Jadhao
Department of Computer Engineering
Hope Foundation’s International Institute of Information Technology, I²IT
Hinjawadi, Pune – 411 057
Phone - +91 20 22933441
www.isquareit.edu.in | shilpaj@isquareit.edu.in
17