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

PPTX
Linked list
PDF
Datatype
PPTX
Unit 1-perl names values and variables
PDF
PPTX
Linked list
PPTX
Java Final Keyword
PDF
The Object Model
PPSX
Functional dependency
Linked list
Datatype
Unit 1-perl names values and variables
Linked list
Java Final Keyword
The Object Model
Functional dependency

What's hot (20)

PDF
Python recursion
PDF
Data Structures & Algorithm design using C
PDF
Java Collections API
DOCX
DBMS lab manual
PDF
P code
PPTX
memory allocation by Novodita
PPT
Data structure lecture 1
PPTX
Unit 5 composite datatypes
PPTX
Sorting And Type of Sorting
PDF
5.Elements of Assembly Language in System Software.pdf
PPT
Data Structures- Part5 recursion
PPTX
Os unit 3 , process management
PPTX
Unit 2 : Internet Address
PDF
Code optimization in compiler design
PDF
Run time storage
PPTX
Stack_Application_Infix_Prefix.pptx
PDF
The CAP Theorem
PPTX
Compiler Design Unit 4
PPT
standard template library(STL) in C++
PPT
Unit 4 external sorting
Python recursion
Data Structures & Algorithm design using C
Java Collections API
DBMS lab manual
P code
memory allocation by Novodita
Data structure lecture 1
Unit 5 composite datatypes
Sorting And Type of Sorting
5.Elements of Assembly Language in System Software.pdf
Data Structures- Part5 recursion
Os unit 3 , process management
Unit 2 : Internet Address
Code optimization in compiler design
Run time storage
Stack_Application_Infix_Prefix.pptx
The CAP Theorem
Compiler Design Unit 4
standard template library(STL) in C++
Unit 4 external sorting
Ad

Viewers also liked (20)

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

Similar to Introduction to java (20)

PPTX
Java. converted (2)
PPTX
java tutorial for beginner - Free Download
PPTX
Introduction to java
PDF
Introduction to Java
PDF
Introduction to Java
PPTX
Introduction to java
PPTX
Java Fundamentals in Mule
PPT
introduction_to_core_elementry_java-1.ppt
PPTX
Introduction to java
PPTX
Introduction to java
PPTX
Unit1 introduction to Java
PDF
Introduction to Java
PPTX
Java basics at Lara Technologies
PPTX
java slides
PPTX
Chapter One Basics ofJava Programmming.pptx
PPT
Java ppt-class_Introduction_class_Objects.ppt
PPTX
Java basics at dallas technologies
PPTX
Java basic
PPT
Java ppt-class_basic data types methods definitions
PPTX
unit1.pptx
Java. converted (2)
java tutorial for beginner - Free Download
Introduction to java
Introduction to Java
Introduction to Java
Introduction to java
Java Fundamentals in Mule
introduction_to_core_elementry_java-1.ppt
Introduction to java
Introduction to java
Unit1 introduction to Java
Introduction to Java
Java basics at Lara Technologies
java slides
Chapter One Basics ofJava Programmming.pptx
Java ppt-class_Introduction_class_Objects.ppt
Java basics at dallas technologies
Java basic
Java ppt-class_basic data types methods definitions
unit1.pptx

More from javeed_mhd (20)

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

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Network Security Unit 5.pdf for BCA BBA.
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Big Data Technologies - Introduction.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation theory and applications.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf
Empathic Computing: Creating Shared Understanding
MIND Revenue Release Quarter 2 2025 Press Release
NewMind AI Weekly Chronicles - August'25 Week I
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Review of recent advances in non-invasive hemoglobin estimation
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
“AI and Expert System Decision Support & Business Intelligence Systems”
Diabetes mellitus diagnosis method based random forest with bat algorithm
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Network Security Unit 5.pdf for BCA BBA.
The AUB Centre for AI in Media Proposal.docx
Big Data Technologies - Introduction.pptx
MYSQL Presentation for SQL database connectivity
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

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