SlideShare una empresa de Scribd logo
1 de 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.}}

Más contenido relacionado

La actualidad más candente

La actualidad más candente (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
 

Similar a Java introduction

Similar a 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
 

Último

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
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...apidays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
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...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

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.}}