SlideShare a Scribd company logo
2
Most read
3
Most read
11
Most read
Introduction to JAVA
Introduction to Java
 J ava is an object oriented programming language..
 A Java Virtual Machine (JVM) is used to run Java programs.The
JVM can be made to run on different platforms, like Linux and
Windows, so the same Java programs can run on computers with
different operating systems.
 Write Once, Run Anywhere.
 The Java Application Programming Interfaces (APIs, or class
libraries) are a set of prebuilt classes that you can use in your
own programs.
 if the Java language is like a set of grammar rules in a spoken
language, then the APIs are dictionaries full of words that can be
 Java is a general purpose, HLL developed by Sun MicroSystem
 The Java programming language was developed by a small team of
engineers, known as the Green Team, who initiated the language in
1991.
 The Java language was originally called OAK, and at the time it was
designed for handheld devices and set-top boxes.
 Oak was unsuccessful and in 1995 Sun changed the name to Java and
modified the language to take advantage of the burgeoning
World Wide Web.
 Later, in 2009, Oracle Corporation acquired Sun Microsystems and
took ownership of two key Sun software assets: Java and Solaris.
Advantage
 Relatively Simple to Use
J ava is a high level language, which means Java abstracts away (i.e.
handles for you) most of the complex details of the machine
(computer) such as memory management, etc.
 Scalability
 Easier to Maintain
Java is a statically-typed language, which means your code will have to
be checked for errors before it can be built into an app
As a statically typed language, Java is faster than dynamically typed
languages because things are more clearly defined.
 Optimized Performance
Features of Java
 Simple
 Architecture-neutral
 Object-Oriented
 Distributed
 Compiled
 Interpreted
 Statically Typed
 Multi-Threaded
 Garbage Collected
 Portable
 High-Performance
 Robust
 Secure
 Extensible
 Well-Understood
Java is not a purely Object-Oriented
Language?
 It fails to support:
1. All predefined types are objects
2.All operations performed on objects must be only through
methods exposed at the objects.
 In Java, we have predefined types as non-objects
 The static keyword:When we declares a class as static
then it can be used without the use of an object in
Java.
JVM (Java Virtual Machine)
 JVM (Java Virtual Machine) is an abstract machine. It
is a specification that provides runtime environment
in which java bytecode can be executed.
 A specification where working of Java Virtual
Machine is specified. But implementation provider is
independent to choose the algorithm. Its
implementation has been provided by Sun and other
companies.
 An implementation Its implementation is known as
JRE (Java Runtime Environment).
 Runtime Instance Whenever you write java
command on the command prompt to run the java
class, an instance of JVM is created
JVM (Java Virtual Machine)
 What it does
The JVM performs following operation:
1..Loads code
2.Verifies code
3.Executes code
4.Provides runtime environment
 JVM provides definition for
1. Memory area
2.Class file format
3.Register set
4.Garbage-collected heap
JVM (Java Virtual Machine)
1) Classloader
Classloader is a subsystem of JVM that is used to load class
files.
2) Class(Method) Area
Class(Method) Area stores per-class structures such as the
runtime constant pool, field and method data, the code
for methods.
3) Heap
It is the runtime data area in which objects are allocated.
4) Stack
It holds local variables & partial results. Each thread has a
5) Program Counter Register
PC (program counter) register. It contains the address of the
Java virtual machine instruction currently being executed.
6) Native Method Stack
It contains all the native methods used in the application.
7) Executive Engine
a. Virtual processor
b. Interpreter-Read bytecode stream then execute the
instructions
c. Just-In-Time Compiler-compiles parts of the byte code that
have similar functionality at the same time, and hence
reduces the amount of time needed for compilation.
The Way Java
Works
Introduction to Java
Write Once, Run Anywhere
ByteCode
 Java compilation produces “bytecode”
 Intermediate code readable by the VM.
 Transferable across the Internet as applets.
 VM interprets BC into instructions
 Partly responsible for performance lag.
 ByteCode produced on any platform may be executed on
any other platform which supports a VM.
JDK Directory Structure

More Related Content

PDF
java ppt.pdf
PPTX
Introduction to Object Oriented Programming
PPTX
Introduction to Java -unit-1
PPTX
Features of java
PPTX
Control structures in java
ODP
Basic of Java
PPT
Object and class relationships
PPS
Java Exception handling
java ppt.pdf
Introduction to Object Oriented Programming
Introduction to Java -unit-1
Features of java
Control structures in java
Basic of Java
Object and class relationships
Java Exception handling

What's hot (20)

PPTX
Interface in java
PPTX
AutoBoxing and Unboxing in java ppt.pptx
PPTX
I/O Streams
PPTX
Important features of java
PPT
Java features
PDF
Introduction to django framework
PPTX
Packages in java
PDF
Object oriented programming c++
PPT
History of c++
PPTX
Abstract Class Presentation
PPTX
core java
PPT
Looping statements in Java
PPTX
INLINE FUNCTION IN C++
PPTX
Intro to oop.pptx
PPT
Basics of c++ Programming Language
PPT
Java-java virtual machine
PDF
PPTX
Interfaces in java
PPTX
Command line arguments
Interface in java
AutoBoxing and Unboxing in java ppt.pptx
I/O Streams
Important features of java
Java features
Introduction to django framework
Packages in java
Object oriented programming c++
History of c++
Abstract Class Presentation
core java
Looping statements in Java
INLINE FUNCTION IN C++
Intro to oop.pptx
Basics of c++ Programming Language
Java-java virtual machine
Interfaces in java
Command line arguments
Ad

Similar to Introduction to Java (20)

PPTX
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
PPTX
Object Oriented Programming Part 1 of Unit 1
PDF
Technology Tutorial.pdf
PDF
TechSearchWeb.pdf
PDF
TechSearchWeb Tutorials.pdf
PPTX
Chapter 1 (1).pptx
PPTX
UNIT 1.pptx
PPTX
Iintroduction to java , Java Coding , basics of java.pptx
PPTX
Introduction to java
PDF
Java Basic.pdf
PPTX
Unit1 introduction to Java
PPTX
Java fundamentals
PPTX
Getting Started with JAVA
PDF
Java unit 1
PPTX
PPTX
PPTX
PPTX
PPTX
PPTX
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
Object Oriented Programming Part 1 of Unit 1
Technology Tutorial.pdf
TechSearchWeb.pdf
TechSearchWeb Tutorials.pdf
Chapter 1 (1).pptx
UNIT 1.pptx
Iintroduction to java , Java Coding , basics of java.pptx
Introduction to java
Java Basic.pdf
Unit1 introduction to Java
Java fundamentals
Getting Started with JAVA
Java unit 1
Ad

Recently uploaded (20)

PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
Geodesy 1.pptx...............................................
PDF
Geotechnical Engineering, Soil mechanics- Soil Testing.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PDF
Queuing formulas to evaluate throughputs and servers
PDF
BRKDCN-2613.pdf Cisco AI DC NVIDIA presentation
PPTX
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Simulation of electric circuit laws using tinkercad.pptx
PPTX
436813905-LNG-Process-Overview-Short.pptx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
24AI201_AI_Unit_4 (1).pptx Artificial intelligence
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
“Next-Gen AI: Trends Reshaping Our World”
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Lesson 3_Tessellation.pptx finite Mathematics
Geodesy 1.pptx...............................................
Geotechnical Engineering, Soil mechanics- Soil Testing.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
Strings in CPP - Strings in C++ are sequences of characters used to store and...
Queuing formulas to evaluate throughputs and servers
BRKDCN-2613.pdf Cisco AI DC NVIDIA presentation
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Simulation of electric circuit laws using tinkercad.pptx
436813905-LNG-Process-Overview-Short.pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
24AI201_AI_Unit_4 (1).pptx Artificial intelligence
Embodied AI: Ushering in the Next Era of Intelligent Systems
“Next-Gen AI: Trends Reshaping Our World”

Introduction to Java

  • 2. Introduction to Java  J ava is an object oriented programming language..  A Java Virtual Machine (JVM) is used to run Java programs.The JVM can be made to run on different platforms, like Linux and Windows, so the same Java programs can run on computers with different operating systems.  Write Once, Run Anywhere.  The Java Application Programming Interfaces (APIs, or class libraries) are a set of prebuilt classes that you can use in your own programs.  if the Java language is like a set of grammar rules in a spoken language, then the APIs are dictionaries full of words that can be
  • 3.  Java is a general purpose, HLL developed by Sun MicroSystem  The Java programming language was developed by a small team of engineers, known as the Green Team, who initiated the language in 1991.  The Java language was originally called OAK, and at the time it was designed for handheld devices and set-top boxes.  Oak was unsuccessful and in 1995 Sun changed the name to Java and modified the language to take advantage of the burgeoning World Wide Web.  Later, in 2009, Oracle Corporation acquired Sun Microsystems and took ownership of two key Sun software assets: Java and Solaris.
  • 4. Advantage  Relatively Simple to Use J ava is a high level language, which means Java abstracts away (i.e. handles for you) most of the complex details of the machine (computer) such as memory management, etc.  Scalability  Easier to Maintain Java is a statically-typed language, which means your code will have to be checked for errors before it can be built into an app As a statically typed language, Java is faster than dynamically typed languages because things are more clearly defined.  Optimized Performance
  • 5. Features of Java  Simple  Architecture-neutral  Object-Oriented  Distributed  Compiled  Interpreted  Statically Typed  Multi-Threaded  Garbage Collected  Portable  High-Performance  Robust  Secure  Extensible  Well-Understood
  • 6. Java is not a purely Object-Oriented Language?  It fails to support: 1. All predefined types are objects 2.All operations performed on objects must be only through methods exposed at the objects.  In Java, we have predefined types as non-objects  The static keyword:When we declares a class as static then it can be used without the use of an object in Java.
  • 7. JVM (Java Virtual Machine)  JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed.  A specification where working of Java Virtual Machine is specified. But implementation provider is independent to choose the algorithm. Its implementation has been provided by Sun and other companies.  An implementation Its implementation is known as JRE (Java Runtime Environment).  Runtime Instance Whenever you write java command on the command prompt to run the java class, an instance of JVM is created
  • 8. JVM (Java Virtual Machine)  What it does The JVM performs following operation: 1..Loads code 2.Verifies code 3.Executes code 4.Provides runtime environment  JVM provides definition for 1. Memory area 2.Class file format 3.Register set 4.Garbage-collected heap
  • 9. JVM (Java Virtual Machine)
  • 10. 1) Classloader Classloader is a subsystem of JVM that is used to load class files. 2) Class(Method) Area Class(Method) Area stores per-class structures such as the runtime constant pool, field and method data, the code for methods. 3) Heap It is the runtime data area in which objects are allocated. 4) Stack It holds local variables & partial results. Each thread has a
  • 11. 5) Program Counter Register PC (program counter) register. It contains the address of the Java virtual machine instruction currently being executed. 6) Native Method Stack It contains all the native methods used in the application. 7) Executive Engine a. Virtual processor b. Interpreter-Read bytecode stream then execute the instructions c. Just-In-Time Compiler-compiles parts of the byte code that have similar functionality at the same time, and hence reduces the amount of time needed for compilation.
  • 14. Write Once, Run Anywhere
  • 15. ByteCode  Java compilation produces “bytecode”  Intermediate code readable by the VM.  Transferable across the Internet as applets.  VM interprets BC into instructions  Partly responsible for performance lag.  ByteCode produced on any platform may be executed on any other platform which supports a VM.