SlideShare una empresa de Scribd logo
1 de 11
JAVA 
By 
Shridhar B
Object 
Object is the basic unit of any programming 
language.Objects are identified by its unique name. 
An object are identified by its unique name. 
An object represents a particular instance of a class. 
Each instance of an object can hold its relevant data. 
An object is a collection of data members and 
associated member functions.
Classes are data types based on which objects are 
created. Objects with similar properties and methods 
are grouped together to form a class. 
Class represent a set of individual objects 
Example 1: 
consider a class of cars under which Santro Xing, 
Alto andWagonR represents individual objects. 
In this context each car object will have its own 
model, year of manufacturer,Colour,Top Speed, 
Engine power etc.which from properties of the car 
class and the associates functions actions that is
Object functions like start,move,stop from the 
methods of the car class. 
No memory is allocated when the class is created. 
Memory is allocated when the object is created. 
Example 2 : An architect will have blue prints for a 
house…those blue prints will be plan that explain 
exactly the what properties the house will have and 
how they all are laid out. However it is just a blue 
print you cannot live in it. 
Builders will look at the blue prints and use those 
blueprints to make a physical house.
They can use the same blue print to make as many 
houses they want……each house will have the same 
layout and properties. 
Each house can accommodate their own families 
…so one house might have smiths live in it….and 
one house have the Jones live in it. 
The blue print is the class….the house is the 
object…the people living in the house are data stored 
in the object’s properties.
Abstraction: Abstraction means showing essential 
features and hiding non-essential features to the user 
Example: yahoo mail…… 
When you provide the username and password and 
click on the submit button…It will show the 
Compose,Inbox,Outbox,Sent mails…..so when u 
click on compose it will open…but the user does not 
what are the internal operations the internal 
actions…that is non-essential things. 
TV remote…..Remote is an interface between user 
and tv..right which has buttons 0 to 10..on/of etc.
But we donot know circuits inside the remote. 
Users does not need to know…just he is using 
essential things like remote
Encapsulation means which binds the data and 
code(or) writing operations and methods in a single 
unit. 
For example : A car is having a multiple parts …Like 
steering ,wheels and engine…which binds together to 
form a single object that is car…So here multiple 
parts of cars encapsulates itself together to form a 
single object that is car. 
Encapsulation = Abstraction + data Hiding
Inheritance: Deriving a new class from the existing 
class is called inheritance. Derived class is getting all 
the features from the existing class and also 
incorporating some new features to the existing class. 
Class Address 
{ 
String name; 
String doorno; 
String streetname; 
}
Class latest address extends address{ 
String City; 
String State; 
String Country; 
}
Polymorphism: is the ability to take more than one 
form that an operation can exhibit different behavior 
at different instance depend upon the data passed in 
the operation. 
We behave differently in front of elders and friends. 
A single person is behaving differently at different 
time. 
A software engineer can perform different task at 
different instance of time depending on the task 
assigned to hime.He can do coding, testing, and 
analyzing ,designing depending on the task assign 
and the requirement.

Más contenido relacionado

La actualidad más candente

Introduction to object oriented programming
Introduction to object oriented programmingIntroduction to object oriented programming
Introduction to object oriented programmingAbzetdin Adamov
 
Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)MD Sulaiman
 
itft-Fundamentals of object–oriented programming in java
itft-Fundamentals of object–oriented programming in javaitft-Fundamentals of object–oriented programming in java
itft-Fundamentals of object–oriented programming in javaAtul Sehdev
 
OOP programming
OOP programmingOOP programming
OOP programminganhdbh
 
Object Oriented Programming Languages
Object Oriented Programming LanguagesObject Oriented Programming Languages
Object Oriented Programming LanguagesMannu Khani
 
Object Oriented Programming Principles
Object Oriented Programming PrinciplesObject Oriented Programming Principles
Object Oriented Programming PrinciplesAndrew Ferlitsch
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01Adil Kakakhel
 
Classes And Objects
Classes And ObjectsClasses And Objects
Classes And Objectsrahulsahay19
 
Ruby OOP: Objects over Classes
Ruby OOP: Objects over ClassesRuby OOP: Objects over Classes
Ruby OOP: Objects over ClassesAman King
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMd. Tanvir Hossain
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP conceptsAhmed Farag
 

La actualidad más candente (20)

Introduction to object oriented programming
Introduction to object oriented programmingIntroduction to object oriented programming
Introduction to object oriented programming
 
Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)
 
itft-Fundamentals of object–oriented programming in java
itft-Fundamentals of object–oriented programming in javaitft-Fundamentals of object–oriented programming in java
itft-Fundamentals of object–oriented programming in java
 
Oop
OopOop
Oop
 
OOP programming
OOP programmingOOP programming
OOP programming
 
Object Oriented Programming Languages
Object Oriented Programming LanguagesObject Oriented Programming Languages
Object Oriented Programming Languages
 
Object Oriented Programming Principles
Object Oriented Programming PrinciplesObject Oriented Programming Principles
Object Oriented Programming Principles
 
OOP
OOPOOP
OOP
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01
 
Classes And Objects
Classes And ObjectsClasses And Objects
Classes And Objects
 
Ruby OOP: Objects over Classes
Ruby OOP: Objects over ClassesRuby OOP: Objects over Classes
Ruby OOP: Objects over Classes
 
[OOP - Lec 01] Introduction to OOP
[OOP - Lec 01] Introduction to OOP[OOP - Lec 01] Introduction to OOP
[OOP - Lec 01] Introduction to OOP
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
OOPS Characteristics
OOPS CharacteristicsOOPS Characteristics
OOPS Characteristics
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP concepts
 
Lecture 1 oop
Lecture 1 oopLecture 1 oop
Lecture 1 oop
 
Ah java-ppt2
Ah java-ppt2Ah java-ppt2
Ah java-ppt2
 
2 Object Oriented Programming
2 Object Oriented Programming2 Object Oriented Programming
2 Object Oriented Programming
 
General oops concepts
General oops conceptsGeneral oops concepts
General oops concepts
 
OOP Basics
OOP BasicsOOP Basics
OOP Basics
 

Similar a Java Object-Oriented Programming Conecpts(Real-Time) Examples

COMP111-Week-1_138439.pptx
COMP111-Week-1_138439.pptxCOMP111-Week-1_138439.pptx
COMP111-Week-1_138439.pptxFarooqTariq8
 
Java is an Object-Oriented Language
Java is an Object-Oriented LanguageJava is an Object-Oriented Language
Java is an Object-Oriented Languageale8819
 
Object-Oriented Concepts
Object-Oriented ConceptsObject-Oriented Concepts
Object-Oriented ConceptsAbdalla Mahmoud
 
Notes About Linden Scripting 2009 Congress
Notes About Linden Scripting 2009 CongressNotes About Linden Scripting 2009 Congress
Notes About Linden Scripting 2009 Congressdraceina
 
香港六合彩 » SlideShare
香港六合彩 » SlideShare香港六合彩 » SlideShare
香港六合彩 » SlideSharebiyu
 
Engineering And Technology
Engineering And TechnologyEngineering And Technology
Engineering And TechnologyAmanda Reed
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.pptTigistTilahun1
 
Ooad notes
Ooad notesOoad notes
Ooad notesNancyJP
 
A350103
A350103A350103
A350103aijbm
 
Object Oriented Analysis And Design
Object Oriented Analysis And DesignObject Oriented Analysis And Design
Object Oriented Analysis And DesignSahil Mahajan
 
Basics of object oriented programming c++ [autosaved]
Basics of object oriented programming c++ [autosaved]Basics of object oriented programming c++ [autosaved]
Basics of object oriented programming c++ [autosaved]RAVIPUROHIT22
 
Class as the basis of all computation
Class as the basis of all computationClass as the basis of all computation
Class as the basis of all computationabhijeetkumarkar422
 

Similar a Java Object-Oriented Programming Conecpts(Real-Time) Examples (20)

COMP111-Week-1_138439.pptx
COMP111-Week-1_138439.pptxCOMP111-Week-1_138439.pptx
COMP111-Week-1_138439.pptx
 
Java is an Object-Oriented Language
Java is an Object-Oriented LanguageJava is an Object-Oriented Language
Java is an Object-Oriented Language
 
java
javajava
java
 
Object-Oriented Concepts
Object-Oriented ConceptsObject-Oriented Concepts
Object-Oriented Concepts
 
Java pdf
Java   pdfJava   pdf
Java pdf
 
Notes About Linden Scripting 2009 Congress
Notes About Linden Scripting 2009 CongressNotes About Linden Scripting 2009 Congress
Notes About Linden Scripting 2009 Congress
 
香港六合彩 » SlideShare
香港六合彩 » SlideShare香港六合彩 » SlideShare
香港六合彩 » SlideShare
 
Engineering And Technology
Engineering And TechnologyEngineering And Technology
Engineering And Technology
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.ppt
 
Ooad notes
Ooad notesOoad notes
Ooad notes
 
A350103
A350103A350103
A350103
 
Objects by Sufian Idris
Objects by Sufian IdrisObjects by Sufian Idris
Objects by Sufian Idris
 
Classes1
Classes1Classes1
Classes1
 
Object Oriented Analysis And Design
Object Oriented Analysis And DesignObject Oriented Analysis And Design
Object Oriented Analysis And Design
 
Basics of object oriented programming c++ [autosaved]
Basics of object oriented programming c++ [autosaved]Basics of object oriented programming c++ [autosaved]
Basics of object oriented programming c++ [autosaved]
 
C++
C++C++
C++
 
2 oop
2 oop2 oop
2 oop
 
Mca 504 dotnet_unit3
Mca 504 dotnet_unit3Mca 504 dotnet_unit3
Mca 504 dotnet_unit3
 
Oop
OopOop
Oop
 
Class as the basis of all computation
Class as the basis of all computationClass as the basis of all computation
Class as the basis of all computation
 

Más de Shridhar Ramesh (6)

Core java
Core javaCore java
Core java
 
Java(Access Modifiers)
Java(Access Modifiers)Java(Access Modifiers)
Java(Access Modifiers)
 
Java
JavaJava
Java
 
Java2
Java2Java2
Java2
 
Java
JavaJava
Java
 
Android
AndroidAndroid
Android
 

Último

HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 

Último (20)

HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 

Java Object-Oriented Programming Conecpts(Real-Time) Examples

  • 2. Object Object is the basic unit of any programming language.Objects are identified by its unique name. An object are identified by its unique name. An object represents a particular instance of a class. Each instance of an object can hold its relevant data. An object is a collection of data members and associated member functions.
  • 3. Classes are data types based on which objects are created. Objects with similar properties and methods are grouped together to form a class. Class represent a set of individual objects Example 1: consider a class of cars under which Santro Xing, Alto andWagonR represents individual objects. In this context each car object will have its own model, year of manufacturer,Colour,Top Speed, Engine power etc.which from properties of the car class and the associates functions actions that is
  • 4. Object functions like start,move,stop from the methods of the car class. No memory is allocated when the class is created. Memory is allocated when the object is created. Example 2 : An architect will have blue prints for a house…those blue prints will be plan that explain exactly the what properties the house will have and how they all are laid out. However it is just a blue print you cannot live in it. Builders will look at the blue prints and use those blueprints to make a physical house.
  • 5. They can use the same blue print to make as many houses they want……each house will have the same layout and properties. Each house can accommodate their own families …so one house might have smiths live in it….and one house have the Jones live in it. The blue print is the class….the house is the object…the people living in the house are data stored in the object’s properties.
  • 6. Abstraction: Abstraction means showing essential features and hiding non-essential features to the user Example: yahoo mail…… When you provide the username and password and click on the submit button…It will show the Compose,Inbox,Outbox,Sent mails…..so when u click on compose it will open…but the user does not what are the internal operations the internal actions…that is non-essential things. TV remote…..Remote is an interface between user and tv..right which has buttons 0 to 10..on/of etc.
  • 7. But we donot know circuits inside the remote. Users does not need to know…just he is using essential things like remote
  • 8. Encapsulation means which binds the data and code(or) writing operations and methods in a single unit. For example : A car is having a multiple parts …Like steering ,wheels and engine…which binds together to form a single object that is car…So here multiple parts of cars encapsulates itself together to form a single object that is car. Encapsulation = Abstraction + data Hiding
  • 9. Inheritance: Deriving a new class from the existing class is called inheritance. Derived class is getting all the features from the existing class and also incorporating some new features to the existing class. Class Address { String name; String doorno; String streetname; }
  • 10. Class latest address extends address{ String City; String State; String Country; }
  • 11. Polymorphism: is the ability to take more than one form that an operation can exhibit different behavior at different instance depend upon the data passed in the operation. We behave differently in front of elders and friends. A single person is behaving differently at different time. A software engineer can perform different task at different instance of time depending on the task assigned to hime.He can do coding, testing, and analyzing ,designing depending on the task assign and the requirement.