SlideShare une entreprise Scribd logo
1  sur  25
JAVA INTRODUCTION
NAVEENA E.
What is Java?
Java is a programming language and a platform.
Java is a high level, robust, secured and object-
oriented programming language.
Platform: Any hardware or software environment
in which a program runs, is known as a platform.
Since Java has its own runtime environment (JRE)
and API, it is called platform.
Where it is used?
 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.
Types of Java Applications
1) Standalone Application
It is also known as desktop application or window-based
application. An application that we need to install on every
machine such as media player, antivirus etc. AWT and Swing
are used in java for creating standalone applications.
2) Web Application
An application that runs on the server side and creates
dynamic page, is called web application. Currently, servlet,
jsp. technologies are used for creating web applications in
java.
3) Enterprise Application
An application that is distributed in nature, such as banking
applications etc. It has the advantage of high level security,
load balancing and clustering. In java, EJB is used for
creating enterprise applications.
4) Mobile Application
An application that is created for mobile devices.
Currently Android and Java ME are used for
creating mobile applications.
History of Java
 Java history is interesting to know. The history of java
starts from Green Team. Java team members (also
known as Green Team), initiated a revolutionary task to
develop a language for digital devices such as set-top
boxes, televisions etc.
 Java is used in internet programming, mobile devices,
games, e-business solutions etc.
 Firstly, it was called "Greentalk" by James Gosling and file
extension was .gt.
 After that, it was called Oak and was developed as a part of
the Green project.
 Why Oak? Oak is a symbol of strength and choosen 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.
 Java is an island of Indonesia where first coffee was produced
(called java coffee).
 Notice that Java is just a name not an acronym.
 Originally developed by James Gosling at Sun Microsystems
(which is now a subsidiary of Oracle Corporation) and released in
1995.
 In 1995, Time magazine called Java one of the Ten Best
Products of 1995.
 JDK 1.0 released in(January 23, 1996).
Simple
 Java language is simple because:
 syntax is based on C++ (so easier for programmers to
learn it after C++).
 removed many confusing and/or rarely-used features e.g.,
explicit pointers, operator overloading etc.
 No need to remove unreferenced objects because there is
Automatic Garbage Collection in java.
Object-oriented
 Object
 Class
 Inheritance
 Polymorphism
 Abstraction
 Encapsulation
Platform Independent
 There are two types of platforms software-based and
hardware-based. Java provides software-based platform.
 it is a software-based platform that runs on the top of other
hardware-based platforms.
 Java code is compiled by the compiler and converted into
bytecode. This bytecode is a platform-independent code
because it can be run on multiple platforms i.e. Write Once
and Run Anywhere(WORA).
Secured
Java is secured because:
o No explicit pointer
o Java Programs run inside virtual machine .
o Classloader: adds security by separating the
package for the classes of the local file system from
those that are imported from network sources.
Bytecode Verifier:
checks the code fragments for illegal code that can violate
access right to objects.
Security Manager:
determines what resources a class can access such as
reading and writing to the local disk.
These security are provided by java language.
Robust
Robust simply means strong. Java uses strong
memory management. There are lack of pointers that
avoids security problem. There is automatic garbage
collection in java. There is exception handling and
type checking mechanism in java. All these points
makes java robust.
Architecture-neutral
 There is no implementation dependent features e.g. size of
primitive types is fixed.
 In C programming, int data type occupies 2 bytes of
memory for 32-bit architecture and 4 bytes of memory for
64-bit architecture. But in java, it occupies 4 bytes of
memory for both 32 and 64 bit architectures.
Portable
We may carry the java bytecode to any platform.
High-performance
Java is faster than traditional interpretation since byte
code is "close" to native code still somewhat slower than a
compiled language (e.g., C++)
Distributed
 We can create distributed applications in java. RMI
and EJB are used for creating distributed applications.
We may access files by calling the methods from any
machine on the internet.
Wrapper classes

The object of the wrapper class contains or wraps its
respective primitive data type. Converting primitive data
types into object is called boxing, and this is taken care
by the compiler.
Primitive Type Wrapper class
boolean Boolean
char Character
byte Byte
short Short
int Integer
long Long
float Float
double Double
 public class Test {
 public static void main(String args[]) {
 Integer x = 5; // boxes int to an Integer object
 x = x + 10; // unboxes the Integer to a int
 System.out.println(x);
 }
 }
Output
 15
 When x is assigned an integer value, the compiler boxes the integer because x is
integer object. Later, x is unboxed so that they can be added as an integer.
1.public class WrapperExample1{
2.public static void main(String args[]){
3.//Converting int into Integer
4.int a=20;
5.Integer i=Integer.valueOf(a);//converting int
into Integer
6.Integer j=a;//autoboxing, now compiler will
write Integer.valueOf(a) internally
7.
8.System.out.println(a+" "+i+" "+j);
9.}}

Contenu connexe

Tendances

Presentación rs232 java
Presentación rs232 javaPresentación rs232 java
Presentación rs232 java
John Rojas
 

Tendances (20)

JAVA ENVIRONMENT
JAVA  ENVIRONMENTJAVA  ENVIRONMENT
JAVA ENVIRONMENT
 
Java byte code presentation
Java byte code presentationJava byte code presentation
Java byte code presentation
 
Presentation on Core java
Presentation on Core javaPresentation on Core java
Presentation on Core java
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVA
 
JVM
JVMJVM
JVM
 
Features of java
Features of javaFeatures of java
Features of java
 
Java Development Kit (jdk)
Java Development Kit (jdk)Java Development Kit (jdk)
Java Development Kit (jdk)
 
core java
core javacore java
core java
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
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...
 
Presentación rs232 java
Presentación rs232 javaPresentación rs232 java
Presentación rs232 java
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
1 Introduction To Java Technology
1 Introduction To Java Technology 1 Introduction To Java Technology
1 Introduction To Java Technology
 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
 
Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
Java Virtual Machine (JVM), Difference JDK, JRE & JVMJava Virtual Machine (JVM), Difference JDK, JRE & JVM
Java Virtual Machine (JVM), Difference JDK, JRE & JVM
 
Java 1
Java 1Java 1
Java 1
 
Features of java 02
Features of java 02Features of java 02
Features of java 02
 
Java and internet fundamentals.
Java and internet fundamentals.Java and internet fundamentals.
Java and internet fundamentals.
 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and JitQSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
 

Similaire à Java introduction

PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
CDSukte
 

Similaire à Java introduction (20)

1 .java basic
1 .java basic1 .java basic
1 .java basic
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
 
PPS Java Overview Unit I.ppt
PPS Java Overview Unit I.pptPPS Java Overview Unit I.ppt
PPS Java Overview Unit I.ppt
 
Java
JavaJava
Java
 
JAVA introduction and basic understanding.pptx
JAVA  introduction and basic understanding.pptxJAVA  introduction and basic understanding.pptx
JAVA introduction and basic understanding.pptx
 
Java and its features
Java and its featuresJava and its features
Java and its features
 
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
 
Chapter 1 (1).pptx
Chapter 1 (1).pptxChapter 1 (1).pptx
Chapter 1 (1).pptx
 
Lecture - 1 introduction to java
Lecture - 1 introduction to javaLecture - 1 introduction to java
Lecture - 1 introduction to java
 
Java-Unit-I.ppt
Java-Unit-I.pptJava-Unit-I.ppt
Java-Unit-I.ppt
 
Java
JavaJava
Java
 
Java
JavaJava
Java
 
Java
JavaJava
Java
 
Java
JavaJava
Java
 
Java
JavaJava
Java
 
what is java.pdf
what is java.pdfwhat is java.pdf
what is java.pdf
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
Java 2 computer science.pptx
Java 2 computer science.pptxJava 2 computer science.pptx
Java 2 computer science.pptx
 
Java
JavaJava
Java
 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptx
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Java introduction

  • 2. What is Java? Java is a programming language and a platform. Java is a high level, robust, secured and object- oriented programming language. Platform: Any hardware or software environment in which a program runs, is known as a platform. Since Java has its own runtime environment (JRE) and API, it is called platform.
  • 3. Where it is used?  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.
  • 4. Types of Java Applications 1) Standalone Application It is also known as desktop application or window-based application. An application that we need to install on every machine such as media player, antivirus etc. AWT and Swing are used in java for creating standalone applications.
  • 5. 2) Web Application An application that runs on the server side and creates dynamic page, is called web application. Currently, servlet, jsp. technologies are used for creating web applications in java. 3) Enterprise Application An application that is distributed in nature, such as banking applications etc. It has the advantage of high level security, load balancing and clustering. In java, EJB is used for creating enterprise applications.
  • 6. 4) Mobile Application An application that is created for mobile devices. Currently Android and Java ME are used for creating mobile applications.
  • 7. History of Java  Java history is interesting to know. The history of java starts from Green Team. Java team members (also known as Green Team), initiated a revolutionary task to develop a language for digital devices such as set-top boxes, televisions etc.  Java is used in internet programming, mobile devices, games, e-business solutions etc.
  • 8.  Firstly, it was called "Greentalk" by James Gosling and file extension was .gt.  After that, it was called Oak and was developed as a part of the Green project.  Why Oak? Oak is a symbol of strength and choosen 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.
  • 9.  Java is an island of Indonesia where first coffee was produced (called java coffee).  Notice that Java is just a name not an acronym.  Originally developed by James Gosling at Sun Microsystems (which is now a subsidiary of Oracle Corporation) and released in 1995.  In 1995, Time magazine called Java one of the Ten Best Products of 1995.  JDK 1.0 released in(January 23, 1996).
  • 10.
  • 11. Simple  Java language is simple because:  syntax is based on C++ (so easier for programmers to learn it after C++).  removed many confusing and/or rarely-used features e.g., explicit pointers, operator overloading etc.  No need to remove unreferenced objects because there is Automatic Garbage Collection in java.
  • 12. Object-oriented  Object  Class  Inheritance  Polymorphism  Abstraction  Encapsulation
  • 13. Platform Independent  There are two types of platforms software-based and hardware-based. Java provides software-based platform.  it is a software-based platform that runs on the top of other hardware-based platforms.  Java code is compiled by the compiler and converted into bytecode. This bytecode is a platform-independent code because it can be run on multiple platforms i.e. Write Once and Run Anywhere(WORA).
  • 14.
  • 16. Java is secured because: o No explicit pointer o Java Programs run inside virtual machine . o Classloader: adds security by separating the package for the classes of the local file system from those that are imported from network sources.
  • 17. Bytecode Verifier: checks the code fragments for illegal code that can violate access right to objects. Security Manager: determines what resources a class can access such as reading and writing to the local disk. These security are provided by java language.
  • 18. Robust Robust simply means strong. Java uses strong memory management. There are lack of pointers that avoids security problem. There is automatic garbage collection in java. There is exception handling and type checking mechanism in java. All these points makes java robust.
  • 19. Architecture-neutral  There is no implementation dependent features e.g. size of primitive types is fixed.  In C programming, int data type occupies 2 bytes of memory for 32-bit architecture and 4 bytes of memory for 64-bit architecture. But in java, it occupies 4 bytes of memory for both 32 and 64 bit architectures.
  • 20. Portable We may carry the java bytecode to any platform. High-performance Java is faster than traditional interpretation since byte code is "close" to native code still somewhat slower than a compiled language (e.g., C++)
  • 21. Distributed  We can create distributed applications in java. RMI and EJB are used for creating distributed applications. We may access files by calling the methods from any machine on the internet.
  • 22. Wrapper classes  The object of the wrapper class contains or wraps its respective primitive data type. Converting primitive data types into object is called boxing, and this is taken care by the compiler.
  • 23. Primitive Type Wrapper class boolean Boolean char Character byte Byte short Short int Integer long Long float Float double Double
  • 24.  public class Test {  public static void main(String args[]) {  Integer x = 5; // boxes int to an Integer object  x = x + 10; // unboxes the Integer to a int  System.out.println(x);  }  } Output  15  When x is assigned an integer value, the compiler boxes the integer because x is integer object. Later, x is unboxed so that they can be added as an integer.
  • 25. 1.public class WrapperExample1{ 2.public static void main(String args[]){ 3.//Converting int into Integer 4.int a=20; 5.Integer i=Integer.valueOf(a);//converting int into Integer 6.Integer j=a;//autoboxing, now compiler will write Integer.valueOf(a) internally 7. 8.System.out.println(a+" "+i+" "+j); 9.}}