SlideShare une entreprise Scribd logo
1  sur  10
 Java is object oriented programming and it’s developed by sun
Microsystems of USA in 1991. A first name of java is OAK then
GREEN and last and finally renames its name and called java. As
mentioned earlier object oriented is a term, now it is necessary to
understand some of the concepts used extensively in object oriented
programming.
1. Classes and objects
2. Inheritance
3. Polymorphism
4. Abstraction
5. Encapsulation
6. Dynamic binding
 class are user defined data type its contains data members and
method and object are runtime entity and instance of class.
 Each class is implementing in its own source file.
 Name of the java file is the same as the class name.
 Java application must include a class with a main method e.g.
 public static void main (String args[]).
 A class is not the same as the object that is made from it. A class is
just like the blue print of the object, and the object is just like the
product that is made by using the blueprint. For example car is a
class but its category BMW, Maruti, Ford Figo is objects.
CONTD………………….
 Inheritance is the process by which one object acquires the properties of
another object. This is important because it supports the concept of
hierarchical classification.
 Inheritance method in java
class derived class name(B) extends base class (A)
Example: Suppose take two java classes Class A contains 2 variables and
ClassB Extends Class A that means here ClassB can access the classA
variables without declaring it. If we do this then the memory will be less
and reusable.
 polymorphism means the ability to take more than one form
and its two type
1. Compile time polymorphism
2. Run time polymorphism
Method overloading is an example for Compile
time polymorphism and Method overriding is an example for
Run time polymorphism
 Hiding unnecessary things and showing the essential
information.
Example: Suppose take a car: In that we will have breaks and
steering and etc... Here when we are changing the gear box to
up or bottom then gears will work but we don't know how they
are managing internally and we don't no how it is working. As
a driver we don't need to know how it is working internally
when we are changing every time. That is the reason they will
hide the wires and cables internally and they will show up
only gear box to us.
 Wrapping up of data and methods into a single unit known as
class and it’s the most striking feature of a class.
 Firstly we compile the programs (javac hello.java).
 Second we run the program (java hello).

Contenu connexe

Tendances

Classes and objects till 16 aug
Classes and objects till 16 augClasses and objects till 16 aug
Classes and objects till 16 aug
shashank12march
 

Tendances (20)

Multiple inheritance possible in Java
Multiple inheritance possible in JavaMultiple inheritance possible in Java
Multiple inheritance possible in Java
 
Inheritance
InheritanceInheritance
Inheritance
 
Inheritance in Java
Inheritance in JavaInheritance in Java
Inheritance in Java
 
Oops in Java
Oops in JavaOops in Java
Oops in Java
 
Polymorphism in java
Polymorphism in javaPolymorphism in java
Polymorphism in java
 
Inheritance, friend function, virtual function, polymorphism
Inheritance, friend function, virtual function, polymorphismInheritance, friend function, virtual function, polymorphism
Inheritance, friend function, virtual function, polymorphism
 
Java Programming - Inheritance
Java Programming - InheritanceJava Programming - Inheritance
Java Programming - Inheritance
 
Polymorphism in Java
Polymorphism in JavaPolymorphism in Java
Polymorphism in Java
 
Polymorphism in java
Polymorphism in java Polymorphism in java
Polymorphism in java
 
Inheritance In Java
Inheritance In JavaInheritance In Java
Inheritance In Java
 
Java: Inheritance
Java: InheritanceJava: Inheritance
Java: Inheritance
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
 
Introduction to OOP(in java) BY Govind Singh
Introduction to OOP(in java)  BY Govind SinghIntroduction to OOP(in java)  BY Govind Singh
Introduction to OOP(in java) BY Govind Singh
 
Inheritance in java
Inheritance in java Inheritance in java
Inheritance in java
 
Polymorphism in java
Polymorphism in javaPolymorphism in java
Polymorphism in java
 
Classes and objects till 16 aug
Classes and objects till 16 augClasses and objects till 16 aug
Classes and objects till 16 aug
 
Java oops and fundamentals
Java oops and fundamentalsJava oops and fundamentals
Java oops and fundamentals
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
 
Java Inheritance
Java InheritanceJava Inheritance
Java Inheritance
 

En vedette

En vedette (9)

Flow chart of Electromagnetism
Flow chart of Electromagnetism Flow chart of Electromagnetism
Flow chart of Electromagnetism
 
Java Advance Concepts
Java Advance ConceptsJava Advance Concepts
Java Advance Concepts
 
Strategic Intervention Material: Gene Therapy
Strategic Intervention Material: Gene TherapyStrategic Intervention Material: Gene Therapy
Strategic Intervention Material: Gene Therapy
 
Visual dictionary architecture
Visual dictionary   architectureVisual dictionary   architecture
Visual dictionary architecture
 
Strategic Intervention Material (SIM) Chemistry-COSMETICS
Strategic Intervention Material (SIM) Chemistry-COSMETICSStrategic Intervention Material (SIM) Chemistry-COSMETICS
Strategic Intervention Material (SIM) Chemistry-COSMETICS
 
Basic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a jobBasic java important interview questions and answers to secure a job
Basic java important interview questions and answers to secure a job
 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
 
Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answers
 
Core java complete notes - Contact at +91-814-614-5674
Core java complete notes - Contact at +91-814-614-5674Core java complete notes - Contact at +91-814-614-5674
Core java complete notes - Contact at +91-814-614-5674
 

Similaire à Java and its concepts

Md02 - Getting Started part-2
Md02 - Getting Started part-2Md02 - Getting Started part-2
Md02 - Getting Started part-2
Rakesh Madugula
 
1669617800196.pdf
1669617800196.pdf1669617800196.pdf
1669617800196.pdf
venud11
 

Similaire à Java and its concepts (20)

C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introduction
 
java tr.docx
java tr.docxjava tr.docx
java tr.docx
 
Object+oriented+programming+in+java
Object+oriented+programming+in+javaObject+oriented+programming+in+java
Object+oriented+programming+in+java
 
Java OOPS Concept
Java OOPS ConceptJava OOPS Concept
Java OOPS Concept
 
OOP in Java Presentation.pptx
OOP in Java Presentation.pptxOOP in Java Presentation.pptx
OOP in Java Presentation.pptx
 
Question and answer Programming
Question and answer ProgrammingQuestion and answer Programming
Question and answer Programming
 
Opp concept in c++
Opp concept in c++Opp concept in c++
Opp concept in c++
 
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
 
ITTutor Advanced Java (1).pptx
ITTutor Advanced Java (1).pptxITTutor Advanced Java (1).pptx
ITTutor Advanced Java (1).pptx
 
Core Java interview questions-ppt
Core Java interview questions-pptCore Java interview questions-ppt
Core Java interview questions-ppt
 
Md02 - Getting Started part-2
Md02 - Getting Started part-2Md02 - Getting Started part-2
Md02 - Getting Started part-2
 
1669617800196.pdf
1669617800196.pdf1669617800196.pdf
1669617800196.pdf
 
Oops
OopsOops
Oops
 
java basic .pdf
java basic .pdfjava basic .pdf
java basic .pdf
 
javaopps concepts
javaopps conceptsjavaopps concepts
javaopps concepts
 
Nitish Chaulagai Java1.pptx
Nitish Chaulagai Java1.pptxNitish Chaulagai Java1.pptx
Nitish Chaulagai Java1.pptx
 
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
 
Delphi qa
Delphi qaDelphi qa
Delphi qa
 
MCA NOTES.pdf
MCA NOTES.pdfMCA NOTES.pdf
MCA NOTES.pdf
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview Questions
 

Dernier

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Dernier (20)

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
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
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.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
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 

Java and its concepts

  • 1.
  • 2.  Java is object oriented programming and it’s developed by sun Microsystems of USA in 1991. A first name of java is OAK then GREEN and last and finally renames its name and called java. As mentioned earlier object oriented is a term, now it is necessary to understand some of the concepts used extensively in object oriented programming. 1. Classes and objects 2. Inheritance 3. Polymorphism 4. Abstraction 5. Encapsulation 6. Dynamic binding
  • 3.  class are user defined data type its contains data members and method and object are runtime entity and instance of class.  Each class is implementing in its own source file.  Name of the java file is the same as the class name.  Java application must include a class with a main method e.g.  public static void main (String args[]).  A class is not the same as the object that is made from it. A class is just like the blue print of the object, and the object is just like the product that is made by using the blueprint. For example car is a class but its category BMW, Maruti, Ford Figo is objects. CONTD………………….
  • 4.
  • 5.  Inheritance is the process by which one object acquires the properties of another object. This is important because it supports the concept of hierarchical classification.
  • 6.  Inheritance method in java class derived class name(B) extends base class (A) Example: Suppose take two java classes Class A contains 2 variables and ClassB Extends Class A that means here ClassB can access the classA variables without declaring it. If we do this then the memory will be less and reusable.
  • 7.  polymorphism means the ability to take more than one form and its two type 1. Compile time polymorphism 2. Run time polymorphism Method overloading is an example for Compile time polymorphism and Method overriding is an example for Run time polymorphism
  • 8.  Hiding unnecessary things and showing the essential information. Example: Suppose take a car: In that we will have breaks and steering and etc... Here when we are changing the gear box to up or bottom then gears will work but we don't know how they are managing internally and we don't no how it is working. As a driver we don't need to know how it is working internally when we are changing every time. That is the reason they will hide the wires and cables internally and they will show up only gear box to us.
  • 9.  Wrapping up of data and methods into a single unit known as class and it’s the most striking feature of a class.
  • 10.  Firstly we compile the programs (javac hello.java).  Second we run the program (java hello).