SlideShare a Scribd company logo
1 of 26
JAVA
Object Oriented Programming
Concepts
Topics for Today’s Session
Initially developed
by
James Gosling
at
Sun Microsystems
and
released
in
1995.
JAVA
Object Oriented Programming
 Object oriented Programming is a modern programming method
to design a program using Classes and Objects
Objects
Real world entities that has their own
properties and behaviours such as
Book, Chair, Car, Pen, Table, etc.,
Class
A class is a blueprint or prototype from
which objects are created.
 Major objective is to eliminate unfavorable features
encountered in Procedural approach
Procedural Vs Object Oriented ProgrammingProcedural Programming:
 It is known as POP
 Top Down Approach
 It deals with Algorithms
 Divided into functions
 It needs very less memory
 Doesn’s have Access Modifiers
 Data can move freely from function to function in the system
 It is Less Secure
Example: C, Fortran
Object Oriented Programming:
 It is known as OOP
 Bottom Up Approach
 It deals with data
 Divided into Objects
 It needs more memory that of POP
 Has Access Modifiers
 Objects can move & communicate with each other through member functions
 It is more Secure
Example: C++, JAVA, C#
Object Oriented Paradigm features
 Emphasis is on data rather than procedure.
 Programs are divided into what are known as objects.
 Data structures are designed such that they characterize the
objects.
 Methods that operate on the data of an object are tied
together in the data structure.
 Data is hidden and cannot be accessed by external functions.
 Objects may communicate with each other through methods.
 New data and methods can be easily added whenever
necessary.
 Follows bottom up approach in program design.
 First, the individual base elements of a program are specified.
 Then they are linked together to form larger sub sytems.
Applications of OOP
 Real-time systems
 Simulation and modeling
 Object-oriented databases
 Hypertext, hypermedia and expertext
 AI and expert systems
 Neural networks and parallel programming
 Decision support and office automation systems
What is Java?
 Java is a computing platform for application development
and an object-oriented,
 Class-based and Concurrent programming language
 It means many statements can be executed at the same time
instead of sequentially executing it.
 Java can run on all platforms and free to access.
 It is platform-independent
 Java is Simple, Secure, Robust, Complete Object oriented
and Platform Independent High level Language
 It is Portable and Multi-thread technology gives High
Performance.
 It supports concurrency
 means the code can be executed by multiple processes at
the same time.
OOPS Concepts
 OBJECT ORIENTED PROGRAMMING (OOP) is a programming
concept that works on the principles of abstraction, encapsulation,
inheritance, and polymorphism
 It allows users to create the objects that they want and then,
create methods to handle those objects.
 The basic concept of OOPs is to create objects, re-use them
throughout the program, and manipulate these objects to get
results.
 Object Oriented Programming popularly known as OOP, is used in a
modern programming language like Java
Object-oriented programming has several advantages over procedural
programming:
 OOP is faster and easier to execute
 OOP provides a clear structure for the programs
 OOP helps to keep the Java code DRY "Don't Repeat Yourself", and
makes the code easier to maintain, modify and debug
 OOP makes it possible to create full reusable applications with less
code and shorter development time
OOP simplifies software development and maintenance by
providing some concepts:
1. Object
2. Class
3. Inheritance
4. Polymorphism
5. Abstraction
6. Encapsulation
7. Dynamic Binding
8. Message Passing
Object:
 An instance of a class is known as a Object.
 Objects are the basic runtime entities in an object oriented
system.
 Real world entity that has state and behavior .
For example, a chair, pen, table, keyboard, bike, etc. It can be
physical or logical.
 An object contains an address and takes up
some space in memory.
 Each object contains data and code to
manipulate the data.
Representing an object
Class
 A class is a blueprint or prototype from which objects
are created.
 Collection of objects.
 It is a logical entity not the physical entity
 The class is a group of similar entities.
For example, if a class is “Expensive Cars”
then objects like Mercedes, BMW, Toyota, etc.
Its properties(data) can be - price, model or speed etc.,
Methods - driving, reverse, braking etc.
Two instances of the class Student
 Classes and objects are the two main aspects of object-
oriented programming.
 So, a class is a template for objects, and an object is an
instance of a class.
 When the individual objects are created, they inherit all
the variables and methods from the class.
Data Abstraction
 Hiding internal details and showing functionality is known
as abstraction.
For example phone call, we don't know the internal
processing.
 Abstraction refers to the act of representing essential
features without including the background details or
explanations.
 Classes use the concept of abstraction and they are known
as abstract data types (ADT).
 Classes are defined as a list of abstract attributes such as
size, weight and cost and methods that operate on these
attributes.
 The technique of creating new data types that are well
suited to an application to be programmed is known as Data
Abstraction
 In Java, we use abstract class and interface to achieve
abstraction.
Encapsulation
 Encapsulation means “Combining”.
 The wrapping up of data and methods into a
single unit (called class) is known as
Encapsulation.
For example - in school, a student cannot exist
without a class.
Capsule
Inheritance
 Inheritance involves the creation of new classes (derived classes) from the
existing ones ( base classes ).
 It is the process by which object of one class acquire the properties of
another class.
 It supports the concept of hierarchical classification.
Example: The bird Robin is a part of the class flying bird which is
again a part of the bird
 Provides code reusability.
 Used to achieve runtime
Polymorphism
o Single Inheritance refers to deriving a class from a single
class.
o A class is derived from more than one base class is known as
Multiple inherence.
Polymorphism
 It is a Greek term, “Poly” means “many” and “morph” means
“form”.
 Polymorphism means the ability to take more than one form.
 When one task is performed by different ways
 An operation may exhibit different behaviors in different
instances.
 The behavior depends upon
the types of data used in the
operation.
 There are 2 types of Polymorphism:
1. Compile-time Polymorphism (Method overloading / Static)
2. Runtime Polymorphism (Method Overriding / Dynamic)
Method overloading
 Having multiple methods with same name but with
different signature (number, type and order of
parameters).
Method Overriding
 When a subclass contains a method with the same name
and signature as in the super class .
Dynamic Binding
 Binding refers the linking of a procedure call to the code
to be executed in response to the call.
 Dynamic binding means that the code associated with a
given procedure call is not known until the time of the
call at runtime.
 It is associated with polymorphism & inheritance.
Message Passing
 A Message for an object is a request for execution of a
procedure .
 It is the process of invoking an operation on an object.
 It involves the name of the object, the name of the
method (message) and the information to be sent.
For Example: Employee. salary (name);
Here, Employee is the object,
salary is the message and
name is the parameter that contains information.
Summary
Conclusion
 In this lesson you learnt about
 Object Oriented Programming
 Procedural Vs Object Oriented Programming
 Object Oriented Paradigm
 Applications of OOP
 What is Java?
 OOPs Concepts
Oops concepts || Object Oriented Programming Concepts in Java

More Related Content

What's hot

Data Types & Variables in JAVA
Data Types & Variables in JAVAData Types & Variables in JAVA
Data Types & Variables in JAVAAnkita Totala
 
Object Oriented Programming Concepts using Java
Object Oriented Programming Concepts using JavaObject Oriented Programming Concepts using Java
Object Oriented Programming Concepts using JavaGlenn Guden
 
Java oops and fundamentals
Java oops and fundamentalsJava oops and fundamentals
Java oops and fundamentalsjavaease
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Languagejaimefrozr
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in JavaSpotle.ai
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteTushar B Kute
 
Looping statements in Java
Looping statements in JavaLooping statements in Java
Looping statements in JavaJin Castor
 
Control structures in java
Control structures in javaControl structures in java
Control structures in javaVINOTH R
 
Constructor and Types of Constructors
Constructor and Types of ConstructorsConstructor and Types of Constructors
Constructor and Types of ConstructorsDhrumil Panchal
 

What's hot (20)

Basic concept of OOP's
Basic concept of OOP'sBasic concept of OOP's
Basic concept of OOP's
 
Data Types & Variables in JAVA
Data Types & Variables in JAVAData Types & Variables in JAVA
Data Types & Variables in JAVA
 
Applets in java
Applets in javaApplets in java
Applets in java
 
Object Oriented Programming Concepts using Java
Object Oriented Programming Concepts using JavaObject Oriented Programming Concepts using Java
Object Oriented Programming Concepts using Java
 
Java oops and fundamentals
Java oops and fundamentalsJava oops and fundamentals
Java oops and fundamentals
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
Oops in Java
Oops in JavaOops in Java
Oops in Java
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
 
JVM
JVMJVM
JVM
 
Classes objects in java
Classes objects in javaClasses objects in java
Classes objects in java
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
 
Abstract class
Abstract classAbstract class
Abstract class
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Polymorphism in oop
Polymorphism in oopPolymorphism in oop
Polymorphism in oop
 
Java constructors
Java constructorsJava constructors
Java constructors
 
Looping statements in Java
Looping statements in JavaLooping statements in Java
Looping statements in Java
 
Control structures in java
Control structures in javaControl structures in java
Control structures in java
 
Constructor and Types of Constructors
Constructor and Types of ConstructorsConstructor and Types of Constructors
Constructor and Types of Constructors
 

Similar to Oops concepts || Object Oriented Programming Concepts in Java

Similar to Oops concepts || Object Oriented Programming Concepts in Java (20)

Principles of oop
Principles of oopPrinciples of oop
Principles of oop
 
MCA NOTES.pdf
MCA NOTES.pdfMCA NOTES.pdf
MCA NOTES.pdf
 
INTRODUCTION TO JAVA
INTRODUCTION TO JAVAINTRODUCTION TO JAVA
INTRODUCTION TO JAVA
 
Oops concepts
Oops conceptsOops concepts
Oops concepts
 
POP vs OOP Introduction
POP vs OOP IntroductionPOP vs OOP Introduction
POP vs OOP Introduction
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Language
 
Chapter1 introduction
Chapter1 introductionChapter1 introduction
Chapter1 introduction
 
JAVA - Oops Concept.pptx
JAVA - Oops Concept.pptxJAVA - Oops Concept.pptx
JAVA - Oops Concept.pptx
 
1 intro
1 intro1 intro
1 intro
 
What is oops concept in java?
What is oops concept in java?What is oops concept in java?
What is oops concept in java?
 
OOP
OOPOOP
OOP
 
Java pdf
Java   pdfJava   pdf
Java pdf
 
M.c.a. (sem iv)- java programming
M.c.a. (sem   iv)- java programmingM.c.a. (sem   iv)- java programming
M.c.a. (sem iv)- java programming
 
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptxOBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
 
chapter - 1.ppt
chapter - 1.pptchapter - 1.ppt
chapter - 1.ppt
 
Java oo ps concepts
Java oo ps conceptsJava oo ps concepts
Java oo ps concepts
 
Cs8392 oops 5 units notes
Cs8392 oops 5 units notes Cs8392 oops 5 units notes
Cs8392 oops 5 units notes
 
Java OOPs Concepts.docx
Java OOPs Concepts.docxJava OOPs Concepts.docx
Java OOPs Concepts.docx
 
Ashish oot
Ashish ootAshish oot
Ashish oot
 
Object oriented concepts
Object oriented conceptsObject oriented concepts
Object oriented concepts
 

More from Madishetty Prathibha (13)

Object Oriented programming - Introduction
Object Oriented programming - IntroductionObject Oriented programming - Introduction
Object Oriented programming - Introduction
 
Access modifiers in java
Access modifiers in javaAccess modifiers in java
Access modifiers in java
 
Constructor in java
Constructor in javaConstructor in java
Constructor in java
 
Control statements in java
Control statements in javaControl statements in java
Control statements in java
 
Structure of java program diff c- cpp and java
Structure of java program  diff c- cpp and javaStructure of java program  diff c- cpp and java
Structure of java program diff c- cpp and java
 
Operators in java
Operators in javaOperators in java
Operators in java
 
Types of datastructures
Types of datastructuresTypes of datastructures
Types of datastructures
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
 
Java data types, variables and jvm
Java data types, variables and jvm Java data types, variables and jvm
Java data types, variables and jvm
 
Introduction to data structures (ss)
Introduction to data structures (ss)Introduction to data structures (ss)
Introduction to data structures (ss)
 
Java Tokens
Java  TokensJava  Tokens
Java Tokens
 
Java features
Java  features Java  features
Java features
 
Introduction of java
Introduction  of javaIntroduction  of java
Introduction of java
 

Recently uploaded

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Recently uploaded (20)

9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 

Oops concepts || Object Oriented Programming Concepts in Java

  • 3. Initially developed by James Gosling at Sun Microsystems and released in 1995. JAVA
  • 4. Object Oriented Programming  Object oriented Programming is a modern programming method to design a program using Classes and Objects Objects Real world entities that has their own properties and behaviours such as Book, Chair, Car, Pen, Table, etc., Class A class is a blueprint or prototype from which objects are created.  Major objective is to eliminate unfavorable features encountered in Procedural approach
  • 5. Procedural Vs Object Oriented ProgrammingProcedural Programming:  It is known as POP  Top Down Approach  It deals with Algorithms  Divided into functions  It needs very less memory  Doesn’s have Access Modifiers  Data can move freely from function to function in the system  It is Less Secure Example: C, Fortran Object Oriented Programming:  It is known as OOP  Bottom Up Approach  It deals with data  Divided into Objects  It needs more memory that of POP  Has Access Modifiers  Objects can move & communicate with each other through member functions  It is more Secure Example: C++, JAVA, C#
  • 6. Object Oriented Paradigm features  Emphasis is on data rather than procedure.  Programs are divided into what are known as objects.  Data structures are designed such that they characterize the objects.  Methods that operate on the data of an object are tied together in the data structure.  Data is hidden and cannot be accessed by external functions.  Objects may communicate with each other through methods.  New data and methods can be easily added whenever necessary.  Follows bottom up approach in program design.  First, the individual base elements of a program are specified.  Then they are linked together to form larger sub sytems.
  • 7. Applications of OOP  Real-time systems  Simulation and modeling  Object-oriented databases  Hypertext, hypermedia and expertext  AI and expert systems  Neural networks and parallel programming  Decision support and office automation systems
  • 8. What is Java?  Java is a computing platform for application development and an object-oriented,  Class-based and Concurrent programming language  It means many statements can be executed at the same time instead of sequentially executing it.  Java can run on all platforms and free to access.  It is platform-independent  Java is Simple, Secure, Robust, Complete Object oriented and Platform Independent High level Language  It is Portable and Multi-thread technology gives High Performance.  It supports concurrency  means the code can be executed by multiple processes at the same time.
  • 9.
  • 10.
  • 11. OOPS Concepts  OBJECT ORIENTED PROGRAMMING (OOP) is a programming concept that works on the principles of abstraction, encapsulation, inheritance, and polymorphism  It allows users to create the objects that they want and then, create methods to handle those objects.  The basic concept of OOPs is to create objects, re-use them throughout the program, and manipulate these objects to get results.  Object Oriented Programming popularly known as OOP, is used in a modern programming language like Java Object-oriented programming has several advantages over procedural programming:  OOP is faster and easier to execute  OOP provides a clear structure for the programs  OOP helps to keep the Java code DRY "Don't Repeat Yourself", and makes the code easier to maintain, modify and debug  OOP makes it possible to create full reusable applications with less code and shorter development time
  • 12. OOP simplifies software development and maintenance by providing some concepts: 1. Object 2. Class 3. Inheritance 4. Polymorphism 5. Abstraction 6. Encapsulation 7. Dynamic Binding 8. Message Passing
  • 13. Object:  An instance of a class is known as a Object.  Objects are the basic runtime entities in an object oriented system.  Real world entity that has state and behavior . For example, a chair, pen, table, keyboard, bike, etc. It can be physical or logical.  An object contains an address and takes up some space in memory.  Each object contains data and code to manipulate the data. Representing an object
  • 14. Class  A class is a blueprint or prototype from which objects are created.  Collection of objects.  It is a logical entity not the physical entity  The class is a group of similar entities. For example, if a class is “Expensive Cars” then objects like Mercedes, BMW, Toyota, etc. Its properties(data) can be - price, model or speed etc., Methods - driving, reverse, braking etc. Two instances of the class Student
  • 15.  Classes and objects are the two main aspects of object- oriented programming.  So, a class is a template for objects, and an object is an instance of a class.  When the individual objects are created, they inherit all the variables and methods from the class.
  • 16. Data Abstraction  Hiding internal details and showing functionality is known as abstraction. For example phone call, we don't know the internal processing.  Abstraction refers to the act of representing essential features without including the background details or explanations.  Classes use the concept of abstraction and they are known as abstract data types (ADT).  Classes are defined as a list of abstract attributes such as size, weight and cost and methods that operate on these attributes.  The technique of creating new data types that are well suited to an application to be programmed is known as Data Abstraction  In Java, we use abstract class and interface to achieve abstraction.
  • 17. Encapsulation  Encapsulation means “Combining”.  The wrapping up of data and methods into a single unit (called class) is known as Encapsulation. For example - in school, a student cannot exist without a class. Capsule
  • 18. Inheritance  Inheritance involves the creation of new classes (derived classes) from the existing ones ( base classes ).  It is the process by which object of one class acquire the properties of another class.  It supports the concept of hierarchical classification. Example: The bird Robin is a part of the class flying bird which is again a part of the bird  Provides code reusability.  Used to achieve runtime Polymorphism
  • 19. o Single Inheritance refers to deriving a class from a single class. o A class is derived from more than one base class is known as Multiple inherence.
  • 20. Polymorphism  It is a Greek term, “Poly” means “many” and “morph” means “form”.  Polymorphism means the ability to take more than one form.  When one task is performed by different ways  An operation may exhibit different behaviors in different instances.  The behavior depends upon the types of data used in the operation.
  • 21.  There are 2 types of Polymorphism: 1. Compile-time Polymorphism (Method overloading / Static) 2. Runtime Polymorphism (Method Overriding / Dynamic) Method overloading  Having multiple methods with same name but with different signature (number, type and order of parameters). Method Overriding  When a subclass contains a method with the same name and signature as in the super class .
  • 22. Dynamic Binding  Binding refers the linking of a procedure call to the code to be executed in response to the call.  Dynamic binding means that the code associated with a given procedure call is not known until the time of the call at runtime.  It is associated with polymorphism & inheritance.
  • 23. Message Passing  A Message for an object is a request for execution of a procedure .  It is the process of invoking an operation on an object.  It involves the name of the object, the name of the method (message) and the information to be sent. For Example: Employee. salary (name); Here, Employee is the object, salary is the message and name is the parameter that contains information.
  • 25. Conclusion  In this lesson you learnt about  Object Oriented Programming  Procedural Vs Object Oriented Programming  Object Oriented Paradigm  Applications of OOP  What is Java?  OOPs Concepts