SlideShare a Scribd company logo
Object Oriented
Programming in JAVA
Introduction
• Welcome to the course Object Oriented
Programming in JAVA. This course will cover a
core set of computer science concepts needed
to create a modern software application using
Java.
Object Oriented Programming using JAVA 2
Course Objectives
On completion of this course we will be able to:
1. Identify the importance of Java .
2. Identify the additional features of Java compared to C++ .
3. Identify the difference between Compiler and Interpreter .
4. Identify the difference between applet and application .
5. Apply Object Oriented Principles of Encapsulations, Data
abstraction, Inheritance, Polymorphism.
6. Program using java API (Application Programming Interface).
7. Program using Exception Handling, Files and Threads .
8. Program Using applets and swings .
Object Oriented Programming using JAVA 3
Course Syllabus
Object Oriented Programming using JAVA 4
UNIT CONCEPTS to be covered
UNIT-I JAVA Basics
UNIT-II Inheritance
UNIT-III Data structures creation and manipulation in java
UNIT-IV Exception Handling
UNIT-V GUI Programming With JAVA
JAVA Basics
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
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)
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.
What is java?
• A general-purpose object-oriented language.
• Write Once Run Anywhere (WORA).
• Designed for easy Web/Internet applications.
• Widespread acceptance.
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.
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.
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.
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.
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.
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
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.
Java is architecture-neutral
Object Oriented Programming using JAVA 17
JAVA Program Execution
WORA(Write Once Run Anywhere)
Object Oriented Programming using JAVA 18
Editplus for Java Programming
• Edit Plus Software :
• EditPlus is a 32-bit text editor for the
Microsoft Windows operating system.
• The editor contains tools for programmers,
including syntax highlighting (and support for
custom syntax files), file type conversions, line
ending conversion (between Linux, Windows
and Mac styles), regular expressions for
search-and-replace, spell check etc).
Object Oriented Programming using JAVA 19
Hello world Program in java
Object Oriented Programming using JAVA 20
Execution of Hello world Program
Object Oriented Programming using JAVA 21
Object Oriented Programming using JAVA 22

More Related Content

What's hot (19)

PPTX
Java Introduction
javeed_mhd
 
ODP
Basic of Java
Ajeet Kumar Verma
 
PDF
Learn Java with Dr. Rifat Shahriyar
Abir Mohammad
 
PPTX
Introduction to Java -unit-1
RubaNagarajan
 
PDF
Genesis and Overview of Java
Ravi_Kant_Sahu
 
PDF
Introduction to basics of java
vinay arora
 
PDF
Learn java in hindi
Vipin sharma
 
PPT
Java Programming for Designers
R. Sosa
 
PPTX
Intro to Java
karianneban
 
PPT
INTRODUCTION TO JAVA APPLICATION
Ajit Yadav
 
PDF
Introduction to java (revised)
Sujit Majety
 
PPTX
Introduction to java
sanjay joshi
 
PPTX
Introduction to java
Veerabadra Badra
 
PPTX
java tutorial for beginner - Free Download
TIB Academy
 
PPTX
Java Programming
Elizabeth alexander
 
PPT
Java introduction
Sagar Verma
 
PPTX
Introduction to JAVA
Md. Tanvir Hossain
 
DOCX
Java and its features
Pydi Nikhil
 
PDF
Introduction to Java Programming Language
jaimefrozr
 
Java Introduction
javeed_mhd
 
Basic of Java
Ajeet Kumar Verma
 
Learn Java with Dr. Rifat Shahriyar
Abir Mohammad
 
Introduction to Java -unit-1
RubaNagarajan
 
Genesis and Overview of Java
Ravi_Kant_Sahu
 
Introduction to basics of java
vinay arora
 
Learn java in hindi
Vipin sharma
 
Java Programming for Designers
R. Sosa
 
Intro to Java
karianneban
 
INTRODUCTION TO JAVA APPLICATION
Ajit Yadav
 
Introduction to java (revised)
Sujit Majety
 
Introduction to java
sanjay joshi
 
Introduction to java
Veerabadra Badra
 
java tutorial for beginner - Free Download
TIB Academy
 
Java Programming
Elizabeth alexander
 
Java introduction
Sagar Verma
 
Introduction to JAVA
Md. Tanvir Hossain
 
Java and its features
Pydi Nikhil
 
Introduction to Java Programming Language
jaimefrozr
 

Viewers also liked (20)

PPTX
WebServices using Soapui
javeed_mhd
 
PPTX
Converting with custom transformer
javeed_mhd
 
PPTX
Idempotent filter with simple file
javeed_mhd
 
PPTX
Mule with quartz
javeed_mhd
 
PPTX
Automatic documentation with mule
javeed_mhd
 
PPTX
Java programming course for beginners
javeed_mhd
 
PPT
Maven
javeed_mhd
 
PPTX
Validating soap request in mule
javeed_mhd
 
PPT
web services
javeed_mhd
 
PPT
Java
javeed_mhd
 
PPTX
Property in mumbai
ajeetfavista
 
PPT
Core java concepts
javeed_mhd
 
PPTX
Strategie působení v sociálních médiích - CVRK
umartinau
 
PDF
MvSM: 6) Jak to změřit - měření a monitoring sociálních médií
Matez Jindra
 
PDF
MvSM: 9) Správa SM a hosté
Matez Jindra
 
PDF
MvSM: 3) Stará dobrá nová média
Matez Jindra
 
PDF
EXIM Tours - marketingová strategie pro sociální média
Jan Maršíček
 
PDF
MvSM: 8) Facebook - jak na marketing v SM #1
Matez Jindra
 
PDF
MvSM: 11) Neziskovky v sociálních médiích
Matez Jindra
 
PPTX
Until successful component in mule
javeed_mhd
 
WebServices using Soapui
javeed_mhd
 
Converting with custom transformer
javeed_mhd
 
Idempotent filter with simple file
javeed_mhd
 
Mule with quartz
javeed_mhd
 
Automatic documentation with mule
javeed_mhd
 
Java programming course for beginners
javeed_mhd
 
Maven
javeed_mhd
 
Validating soap request in mule
javeed_mhd
 
web services
javeed_mhd
 
Property in mumbai
ajeetfavista
 
Core java concepts
javeed_mhd
 
Strategie působení v sociálních médiích - CVRK
umartinau
 
MvSM: 6) Jak to změřit - měření a monitoring sociálních médií
Matez Jindra
 
MvSM: 9) Správa SM a hosté
Matez Jindra
 
MvSM: 3) Stará dobrá nová média
Matez Jindra
 
EXIM Tours - marketingová strategie pro sociální média
Jan Maršíček
 
MvSM: 8) Facebook - jak na marketing v SM #1
Matez Jindra
 
MvSM: 11) Neziskovky v sociálních médiích
Matez Jindra
 
Until successful component in mule
javeed_mhd
 
Ad

Similar to Introduction to java (20)

PPTX
Java Basics in Mule
Rajkattamuri
 
PPTX
Java in Mule
Shahid Shaik
 
PPTX
Java Fundamentals in Mule
Anand kalla
 
PPTX
Introduction to java
sanjay joshi
 
PDF
Introduction to Java
Professional Guru
 
PPT
Java ppt-class_basic data types methods definitions
ganeshkarthy
 
PPTX
Unit1 introduction to Java
DevaKumari Vijay
 
PPT
Java ppt-class_Introduction_class_Objects.ppt
VGaneshKarthikeyan
 
PPTX
java slides
RizwanTariq18
 
PDF
Introduction to Java
Professional Guru
 
PDF
Object Oriented Programming using Java..
sumanyadavdpg
 
PPT
GETTING STARTED WITH JAVA(beginner)
HarshithaAllu
 
PPTX
Java Technologies notes of unit 1 and 2.
sumanyadavdpg
 
PPTX
Java Introduction
sunmitraeducation
 
PPTX
UNIT 1 Programming in java Bsc program.pptx
jijinamt
 
DOCX
java introduction.docx
vikasbagra9887
 
PPTX
JAVA introduction and basic understanding.pptx
prstsomnath22
 
PPT
00 intro to java
Deia Abdullah
 
PDF
OOPS JAVA.pdf
DeepanshuMidha5140
 
PPTX
Java
seenak
 
Java Basics in Mule
Rajkattamuri
 
Java in Mule
Shahid Shaik
 
Java Fundamentals in Mule
Anand kalla
 
Introduction to java
sanjay joshi
 
Introduction to Java
Professional Guru
 
Java ppt-class_basic data types methods definitions
ganeshkarthy
 
Unit1 introduction to Java
DevaKumari Vijay
 
Java ppt-class_Introduction_class_Objects.ppt
VGaneshKarthikeyan
 
java slides
RizwanTariq18
 
Introduction to Java
Professional Guru
 
Object Oriented Programming using Java..
sumanyadavdpg
 
GETTING STARTED WITH JAVA(beginner)
HarshithaAllu
 
Java Technologies notes of unit 1 and 2.
sumanyadavdpg
 
Java Introduction
sunmitraeducation
 
UNIT 1 Programming in java Bsc program.pptx
jijinamt
 
java introduction.docx
vikasbagra9887
 
JAVA introduction and basic understanding.pptx
prstsomnath22
 
00 intro to java
Deia Abdullah
 
OOPS JAVA.pdf
DeepanshuMidha5140
 
Java
seenak
 
Ad

More from javeed_mhd (20)

PPTX
For each component in mule
javeed_mhd
 
PPTX
Filter expression in mule
javeed_mhd
 
PPTX
File component in mule
javeed_mhd
 
PPTX
Database component in mule
javeed_mhd
 
PPTX
Choice component in mule
javeed_mhd
 
PPTX
Vm component in mule
javeed_mhd
 
PPTX
Quartz component in mule
javeed_mhd
 
PPTX
Mule management console installation
javeed_mhd
 
PPTX
Mule esb made system integration easy
javeed_mhd
 
PPTX
Message properties component in mule
javeed_mhd
 
PPTX
Junit in mule demo
javeed_mhd
 
PPTX
How to install sonarqube plugin in anypoint
javeed_mhd
 
PPTX
How to commit a project in svn using svn plugin in anypointstudio
javeed_mhd
 
PPTX
Mapping and listing with mule
javeed_mhd
 
PPT
Mule any point exchange
javeed_mhd
 
PPT
Mule esb api layer
javeed_mhd
 
PDF
Mule Maven Plugin
javeed_mhd
 
PPTX
Mule esb stripe
javeed_mhd
 
PPTX
Mule with stored procedure
javeed_mhd
 
PPTX
Deploying and running in mule standalone
javeed_mhd
 
For each component in mule
javeed_mhd
 
Filter expression in mule
javeed_mhd
 
File component in mule
javeed_mhd
 
Database component in mule
javeed_mhd
 
Choice component in mule
javeed_mhd
 
Vm component in mule
javeed_mhd
 
Quartz component in mule
javeed_mhd
 
Mule management console installation
javeed_mhd
 
Mule esb made system integration easy
javeed_mhd
 
Message properties component in mule
javeed_mhd
 
Junit in mule demo
javeed_mhd
 
How to install sonarqube plugin in anypoint
javeed_mhd
 
How to commit a project in svn using svn plugin in anypointstudio
javeed_mhd
 
Mapping and listing with mule
javeed_mhd
 
Mule any point exchange
javeed_mhd
 
Mule esb api layer
javeed_mhd
 
Mule Maven Plugin
javeed_mhd
 
Mule esb stripe
javeed_mhd
 
Mule with stored procedure
javeed_mhd
 
Deploying and running in mule standalone
javeed_mhd
 

Recently uploaded (20)

PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PDF
Proactive Server and System Monitoring with FME: Using HTTP and System Caller...
Safe Software
 
PDF
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
PPTX
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
PPTX
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PPTX
Wondershare Filmora Crack Free Download 2025
josanj305
 
PDF
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
PPTX
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
 
PDF
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
PDF
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
PPTX
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
PDF
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
PDF
Understanding AI Optimization AIO, LLMO, and GEO
CoDigital
 
PDF
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Proactive Server and System Monitoring with FME: Using HTTP and System Caller...
Safe Software
 
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
Wondershare Filmora Crack Free Download 2025
josanj305
 
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
 
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
Understanding AI Optimization AIO, LLMO, and GEO
CoDigital
 
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 

Introduction to java

  • 2. Introduction • Welcome to the course Object Oriented Programming in JAVA. This course will cover a core set of computer science concepts needed to create a modern software application using Java. Object Oriented Programming using JAVA 2
  • 3. Course Objectives On completion of this course we will be able to: 1. Identify the importance of Java . 2. Identify the additional features of Java compared to C++ . 3. Identify the difference between Compiler and Interpreter . 4. Identify the difference between applet and application . 5. Apply Object Oriented Principles of Encapsulations, Data abstraction, Inheritance, Polymorphism. 6. Program using java API (Application Programming Interface). 7. Program using Exception Handling, Files and Threads . 8. Program Using applets and swings . Object Oriented Programming using JAVA 3
  • 4. Course Syllabus Object Oriented Programming using JAVA 4 UNIT CONCEPTS to be covered UNIT-I JAVA Basics UNIT-II Inheritance UNIT-III Data structures creation and manipulation in java UNIT-IV Exception Handling UNIT-V GUI Programming With JAVA
  • 6. 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
  • 7. 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)
  • 8. 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.
  • 9. What is java? • A general-purpose object-oriented language. • Write Once Run Anywhere (WORA). • Designed for easy Web/Internet applications. • Widespread acceptance.
  • 10. 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.
  • 11. 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.
  • 12. 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.
  • 13. 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.
  • 14. 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.
  • 15. 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
  • 16. 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.
  • 17. Java is architecture-neutral Object Oriented Programming using JAVA 17 JAVA Program Execution
  • 18. WORA(Write Once Run Anywhere) Object Oriented Programming using JAVA 18
  • 19. Editplus for Java Programming • Edit Plus Software : • EditPlus is a 32-bit text editor for the Microsoft Windows operating system. • The editor contains tools for programmers, including syntax highlighting (and support for custom syntax files), file type conversions, line ending conversion (between Linux, Windows and Mac styles), regular expressions for search-and-replace, spell check etc). Object Oriented Programming using JAVA 19
  • 20. Hello world Program in java Object Oriented Programming using JAVA 20
  • 21. Execution of Hello world Program Object Oriented Programming using JAVA 21