SlideShare a Scribd company logo
Object Oriented
Programming in JAVA
By professionalguru
JAVA Basics
http://professional-guru.com/
Why Java is Important
• Two reasons :
– Trouble with C/C++ language is that they are not
portable and are not platform independent
languages.
– Emergence of World Wide Web, which demanded
portable programs
• Portability and security necessitated the
invention of Java
http://professional-guru.com/
History
• James Gosling - Sun Microsystems
• Co founder – Vinod Khosla
• Oak - Java, May 20, 1995, Sun World
• JDK Evolutions
– JDK 1.0 (January 23, 1996)
– JDK 1.1 (February 19, 1997)
– J2SE 1.2 (December 8, 1998)
– J2SE 1.3 (May 8, 2000)
– J2SE 1.4 (February 6, 2002)
– J2SE 5.0 (September 30, 2004)
– Java SE 6 (December 11, 2006)
– Java SE 7 (July 28, 2011)
http://professional-guru.com/
Cont..
• Java Editions.
J2SE(Java 2 Standard Edition) - to develop
client-side standalone applications or applets.
J2ME(Java 2 Micro Edition ) - to develop
applications for mobile devices such as cell
phones.
J2EE(Java 2 Enterprise Edition ) - to develop
server-side applications such as Java servlets
and Java ServerPages.
http://professional-guru.com/
What is java?
• A general-purpose object-oriented language.
• Write Once Run Anywhere (WORA).
• Designed for easy Web/Internet applications.
• Widespread acceptance.
http://professional-guru.com/
How is Java different from C…
• C Language:
– Major difference is that C is a structure oriented language and
Java is an object oriented language and has mechanism to
define classes and objects.
– Java does not support an explicit pointer type
– Java does not have preprocessor, so we cant use #define,
#include and #ifdef statements.
– Java does not include structures, unions and enum data types.
– Java does not include keywords like goto, sizeof and typedef.
– Java adds labeled break and continue statements.
– Java adds many features required for object oriented
programming.
http://professional-guru.com/
How is Java different from C++…
• C++ language
Features removed in java:
Java doesn’t support pointers to avoid unauthorized access
of memory locations.
Java does not include structures, unions and enum data
types.
Java does not support operator over loading.
Preprocessor plays less important role in C++ and so
eliminated entirely in java.
Java does not perform automatic type conversions that
result in loss of precision.
http://professional-guru.com/
Cont…
 Java does not support global variables. Every method
and variable is declared within a class and forms part of
that class.
 Java does not allow default arguments.
 Java does not support inheritance of multiple super
classes by a sub class (i.e., multiple inheritance). This is
accomplished by using ‘interface’ concept.
 It is not possible to declare unsigned integers in java.
 In java objects are passed by reference only. In C++
objects may be passed by value or reference.
http://professional-guru.com/
Cont …
New features added in Java:
 Multithreading, that allows two or more pieces of the
same program to execute concurrently.
 C++ has a set of library functions that use a common
header file. But java replaces it with its own set of API
classes.
 It adds packages and interfaces.
 Java supports automatic garbage collection.
 break and continue statements have been enhanced in
java to accept labels as targets.
 The use of unicode characters ensures portability.
http://professional-guru.com/
Cont …
Features that differ:
 Though C++ and java supports Boolean data type, C++ takes
any nonzero value as true and zero as false. True and false in
java are predefined literals that are values for a boolean
expression.
 Java has replaced the destructor function with a finalize()
function.
 C++ supports exception handling that is similar to java's.
However, in C++ there is no requirement that a thrown
exception be caught.
http://professional-guru.com/
Characteristics of Java
• Java is simple
• Java is object-oriented
• Java is distributed
• Java is interpreted
• Java is robust
• Java is architecture-neutral
• Java is portable
• Java’s performance
• Java is multithreaded
• Java is dynamic
• Java is secure
http://professional-guru.com/
Java Environment
• Java includes many development tools, classes and
methods
– Development tools are part of Java Development Kit (JDK) and
– The classes and methods are part of Java Standard Library (JSL),
also known as Application Programming Interface (API).
• JDK constitutes of tools like java compiler, java
interpreter and many.
• API includes hundreds of classes and methods grouped
into several packages according to their functionality.
http://professional-guru.com/
22

More Related Content

What's hot (20)

PDF
Top 10 Java Interview Questions and Answers 2014
iimjobs and hirist
 
PPT
Most Asked Java Interview Question and Answer
TOPS Technologies
 
PPTX
Core Java introduction | Basics | free course
Kernel Training
 
PDF
Core Java Tutorial
eMexo Technologies
 
PPTX
Java basic
Pooja Thakur
 
PPT
Hibernate introduction
Sagar Verma
 
PDF
Core Java
Prakash Dimmita
 
PPTX
Object+oriented+programming+in+java
Ye Win
 
PPT
Java basic
Arati Gadgil
 
PPTX
Java 101 Intro to Java Programming
agorolabs
 
PDF
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
Edureka!
 
PPT
Java basic introduction
Ideal Eyes Business College
 
PPT
Java for the Beginners
Biswadip Goswami
 
PPTX
Core java
Ravi varma
 
PDF
Java Presentation For Syntax
PravinYalameli
 
PPTX
1_JavIntro
SARJERAO Sarju
 
PPTX
Java interview questions 1
Sherihan Anver
 
PDF
Top 100 Java Interview Questions with Detailed Answers
Whizlabs
 
PDF
Java Interview Questions Answers Guide
DaisyWatson5
 
PPT
Core Java interview questions-ppt
Mayank Kumar
 
Top 10 Java Interview Questions and Answers 2014
iimjobs and hirist
 
Most Asked Java Interview Question and Answer
TOPS Technologies
 
Core Java introduction | Basics | free course
Kernel Training
 
Core Java Tutorial
eMexo Technologies
 
Java basic
Pooja Thakur
 
Hibernate introduction
Sagar Verma
 
Core Java
Prakash Dimmita
 
Object+oriented+programming+in+java
Ye Win
 
Java basic
Arati Gadgil
 
Java 101 Intro to Java Programming
agorolabs
 
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
Edureka!
 
Java basic introduction
Ideal Eyes Business College
 
Java for the Beginners
Biswadip Goswami
 
Core java
Ravi varma
 
Java Presentation For Syntax
PravinYalameli
 
1_JavIntro
SARJERAO Sarju
 
Java interview questions 1
Sherihan Anver
 
Top 100 Java Interview Questions with Detailed Answers
Whizlabs
 
Java Interview Questions Answers Guide
DaisyWatson5
 
Core Java interview questions-ppt
Mayank Kumar
 

Similar to Introduction to Java (20)

PDF
Introduction to Java
Professional Guru
 
PDF
Introduction to Java
Professional Guru
 
PPTX
Introduction to java
princeirfancivil
 
PPTX
Java Introduction
javeed_mhd
 
PPTX
Introduction to java
Phaniu
 
PPTX
Introduction to java
javeed_mhd
 
PPTX
Introduction to java
sanjay joshi
 
PPTX
Introduction to java
sanjay joshi
 
PPTX
Java Basics in Mule
Rajkattamuri
 
PPTX
Java Basics
Khan625
 
PPTX
Java in Mule
Shahid Shaik
 
PPTX
java tutorial for beginner - Free Download
TIB Academy
 
PPTX
Introduction to java
Veerabadra Badra
 
PPTX
Java. converted (2)
AVINASHMEHRA6
 
PPTX
Java Fundamentals in Mule
Anand kalla
 
PPT
Java ppt-class_basic data types methods definitions
ganeshkarthy
 
PPT
Java ppt-class_Introduction_class_Objects.ppt
VGaneshKarthikeyan
 
PPTX
java slides
RizwanTariq18
 
DOCX
java introduction.docx
vikasbagra9887
 
PPTX
Unit1 introduction to Java
DevaKumari Vijay
 
Introduction to Java
Professional Guru
 
Introduction to Java
Professional Guru
 
Introduction to java
princeirfancivil
 
Java Introduction
javeed_mhd
 
Introduction to java
Phaniu
 
Introduction to java
javeed_mhd
 
Introduction to java
sanjay joshi
 
Introduction to java
sanjay joshi
 
Java Basics in Mule
Rajkattamuri
 
Java Basics
Khan625
 
Java in Mule
Shahid Shaik
 
java tutorial for beginner - Free Download
TIB Academy
 
Introduction to java
Veerabadra Badra
 
Java. converted (2)
AVINASHMEHRA6
 
Java Fundamentals in Mule
Anand kalla
 
Java ppt-class_basic data types methods definitions
ganeshkarthy
 
Java ppt-class_Introduction_class_Objects.ppt
VGaneshKarthikeyan
 
java slides
RizwanTariq18
 
java introduction.docx
vikasbagra9887
 
Unit1 introduction to Java
DevaKumari Vijay
 
Ad

More from Professional Guru (19)

PPTX
introduction to AWs
Professional Guru
 
PDF
introduction to AWs
Professional Guru
 
PDF
Introduction to JAVA
Professional Guru
 
PDF
Introduction to Big Data
Professional Guru
 
PPT
Introduction to Azure
Professional Guru
 
PDF
introduction to DEVOPS
Professional Guru
 
PDF
Introduction to Azure
Professional Guru
 
PDF
Introduction to Angular Js
Professional Guru
 
PDF
Dev ops concept
Professional Guru
 
PDF
Robotic Process Automation
Professional Guru
 
PDF
Dev ops concept
Professional Guru
 
PDF
Introduction to AWS
Professional Guru
 
PDF
introduction to hadoop
Professional Guru
 
PDF
Introduction to SQL SERVER
Professional Guru
 
PDF
Introduction to Azure
Professional Guru
 
PDF
Introduction to Angular Js
Professional Guru
 
PDF
Introduction to HTML
Professional Guru
 
PDF
Rpa developer resume
Professional Guru
 
PDF
ANDROID DEVELOPMENT DEMO
Professional Guru
 
introduction to AWs
Professional Guru
 
introduction to AWs
Professional Guru
 
Introduction to JAVA
Professional Guru
 
Introduction to Big Data
Professional Guru
 
Introduction to Azure
Professional Guru
 
introduction to DEVOPS
Professional Guru
 
Introduction to Azure
Professional Guru
 
Introduction to Angular Js
Professional Guru
 
Dev ops concept
Professional Guru
 
Robotic Process Automation
Professional Guru
 
Dev ops concept
Professional Guru
 
Introduction to AWS
Professional Guru
 
introduction to hadoop
Professional Guru
 
Introduction to SQL SERVER
Professional Guru
 
Introduction to Azure
Professional Guru
 
Introduction to Angular Js
Professional Guru
 
Introduction to HTML
Professional Guru
 
Rpa developer resume
Professional Guru
 
ANDROID DEVELOPMENT DEMO
Professional Guru
 
Ad

Recently uploaded (20)

PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 

Introduction to Java

  • 1. Object Oriented Programming in JAVA By professionalguru
  • 3. Why Java is Important • Two reasons : – Trouble with C/C++ language is that they are not portable and are not platform independent languages. – Emergence of World Wide Web, which demanded portable programs • Portability and security necessitated the invention of Java http://professional-guru.com/
  • 4. History • James Gosling - Sun Microsystems • Co founder – Vinod Khosla • Oak - Java, May 20, 1995, Sun World • JDK Evolutions – JDK 1.0 (January 23, 1996) – JDK 1.1 (February 19, 1997) – J2SE 1.2 (December 8, 1998) – J2SE 1.3 (May 8, 2000) – J2SE 1.4 (February 6, 2002) – J2SE 5.0 (September 30, 2004) – Java SE 6 (December 11, 2006) – Java SE 7 (July 28, 2011) http://professional-guru.com/
  • 5. Cont.. • Java Editions. J2SE(Java 2 Standard Edition) - to develop client-side standalone applications or applets. J2ME(Java 2 Micro Edition ) - to develop applications for mobile devices such as cell phones. J2EE(Java 2 Enterprise Edition ) - to develop server-side applications such as Java servlets and Java ServerPages. http://professional-guru.com/
  • 6. What is java? • A general-purpose object-oriented language. • Write Once Run Anywhere (WORA). • Designed for easy Web/Internet applications. • Widespread acceptance. http://professional-guru.com/
  • 7. How is Java different from C… • C Language: – Major difference is that C is a structure oriented language and Java is an object oriented language and has mechanism to define classes and objects. – Java does not support an explicit pointer type – Java does not have preprocessor, so we cant use #define, #include and #ifdef statements. – Java does not include structures, unions and enum data types. – Java does not include keywords like goto, sizeof and typedef. – Java adds labeled break and continue statements. – Java adds many features required for object oriented programming. http://professional-guru.com/
  • 8. How is Java different from C++… • C++ language Features removed in java: Java doesn’t support pointers to avoid unauthorized access of memory locations. Java does not include structures, unions and enum data types. Java does not support operator over loading. Preprocessor plays less important role in C++ and so eliminated entirely in java. Java does not perform automatic type conversions that result in loss of precision. http://professional-guru.com/
  • 9. Cont…  Java does not support global variables. Every method and variable is declared within a class and forms part of that class.  Java does not allow default arguments.  Java does not support inheritance of multiple super classes by a sub class (i.e., multiple inheritance). This is accomplished by using ‘interface’ concept.  It is not possible to declare unsigned integers in java.  In java objects are passed by reference only. In C++ objects may be passed by value or reference. http://professional-guru.com/
  • 10. Cont … New features added in Java:  Multithreading, that allows two or more pieces of the same program to execute concurrently.  C++ has a set of library functions that use a common header file. But java replaces it with its own set of API classes.  It adds packages and interfaces.  Java supports automatic garbage collection.  break and continue statements have been enhanced in java to accept labels as targets.  The use of unicode characters ensures portability. http://professional-guru.com/
  • 11. Cont … Features that differ:  Though C++ and java supports Boolean data type, C++ takes any nonzero value as true and zero as false. True and false in java are predefined literals that are values for a boolean expression.  Java has replaced the destructor function with a finalize() function.  C++ supports exception handling that is similar to java's. However, in C++ there is no requirement that a thrown exception be caught. http://professional-guru.com/
  • 12. Characteristics of Java • Java is simple • Java is object-oriented • Java is distributed • Java is interpreted • Java is robust • Java is architecture-neutral • Java is portable • Java’s performance • Java is multithreaded • Java is dynamic • Java is secure http://professional-guru.com/
  • 13. Java Environment • Java includes many development tools, classes and methods – Development tools are part of Java Development Kit (JDK) and – The classes and methods are part of Java Standard Library (JSL), also known as Application Programming Interface (API). • JDK constitutes of tools like java compiler, java interpreter and many. • API includes hundreds of classes and methods grouped into several packages according to their functionality. http://professional-guru.com/
  • 14. 22