SlideShare a Scribd company logo
Java Inheritance
- Rakesh
Java Inheritance
● Inheritance can be defined as the process where one class acquires the
properties (methods and fields) of another.
● The class which inherits the properties of other is known as subclass (derived
class, child class) and the class whose properties are inherited is known as
superclass (base class, parent class).
extends keyword
● It is used to inherit the properties of a class.
class Parent
{
}
class Child extends Parent
{
}
Types of Inheritance - Single Inheritance
● When a class extends another one class only.
Class A
{
}
Class B extends A
{
}
Types of Inheritance - Multilevel Inheritance
● One can inherit from a derived class, thereby making this derived class the
base class for the new class.
Class X{
}
Class Y extends X{
}
Class Z extends Y{
}
Types of Inheritance - Hierarchical Inheritance
● One class is inherited by many sub classes.
Class X{
}
Class Y extends X{
}
Class Z extends X{
}
Ad

More Related Content

What's hot (20)

Inheritance in JAVA PPT
Inheritance  in JAVA PPTInheritance  in JAVA PPT
Inheritance in JAVA PPT
Pooja Jaiswal
 
Inheritance in Java
Inheritance in JavaInheritance in Java
Inheritance in Java
Tamanna Akter
 
itft-Inheritance in java
itft-Inheritance in javaitft-Inheritance in java
itft-Inheritance in java
Atul Sehdev
 
Java inheritance
Java inheritanceJava inheritance
Java inheritance
BHUVIJAYAVELU
 
Java inheritance
Java inheritanceJava inheritance
Java inheritance
Arati Gadgil
 
inheritance
inheritanceinheritance
inheritance
Jay Prajapati
 
Inheritance in java
Inheritance in java Inheritance in java
Inheritance in java
yash jain
 
Java: Inheritance
Java: InheritanceJava: Inheritance
Java: Inheritance
Tareq Hasan
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
COMSATS Institute of Information Technology
 
Java Inheritance - sub class constructors - Method overriding
Java Inheritance - sub class constructors - Method overridingJava Inheritance - sub class constructors - Method overriding
Java Inheritance - sub class constructors - Method overriding
NithyaN19
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
HarshitaAshwani
 
Inheritance and its types In Java
Inheritance and its types In JavaInheritance and its types In Java
Inheritance and its types In Java
MD SALEEM QAISAR
 
Learn java objects inheritance-overriding-polymorphism
Learn java objects  inheritance-overriding-polymorphismLearn java objects  inheritance-overriding-polymorphism
Learn java objects inheritance-overriding-polymorphism
TOPS Technologies
 
04 inheritance
04 inheritance04 inheritance
04 inheritance
Pondugala Sowjanya
 
Multiple inheritance possible in Java
Multiple inheritance possible in JavaMultiple inheritance possible in Java
Multiple inheritance possible in Java
Kurapati Vishwak
 
java-06inheritance
java-06inheritancejava-06inheritance
java-06inheritance
Arjun Shanka
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
Tech_MX
 
Java Programming - Inheritance
Java Programming - InheritanceJava Programming - Inheritance
Java Programming - Inheritance
Oum Saokosal
 
inheritance
inheritanceinheritance
inheritance
Mohit Patodia
 
Inheritance and Polymorphism
Inheritance and PolymorphismInheritance and Polymorphism
Inheritance and Polymorphism
BG Java EE Course
 
Inheritance in JAVA PPT
Inheritance  in JAVA PPTInheritance  in JAVA PPT
Inheritance in JAVA PPT
Pooja Jaiswal
 
itft-Inheritance in java
itft-Inheritance in javaitft-Inheritance in java
itft-Inheritance in java
Atul Sehdev
 
Inheritance in java
Inheritance in java Inheritance in java
Inheritance in java
yash jain
 
Java: Inheritance
Java: InheritanceJava: Inheritance
Java: Inheritance
Tareq Hasan
 
Java Inheritance - sub class constructors - Method overriding
Java Inheritance - sub class constructors - Method overridingJava Inheritance - sub class constructors - Method overriding
Java Inheritance - sub class constructors - Method overriding
NithyaN19
 
Inheritance and its types In Java
Inheritance and its types In JavaInheritance and its types In Java
Inheritance and its types In Java
MD SALEEM QAISAR
 
Learn java objects inheritance-overriding-polymorphism
Learn java objects  inheritance-overriding-polymorphismLearn java objects  inheritance-overriding-polymorphism
Learn java objects inheritance-overriding-polymorphism
TOPS Technologies
 
Multiple inheritance possible in Java
Multiple inheritance possible in JavaMultiple inheritance possible in Java
Multiple inheritance possible in Java
Kurapati Vishwak
 
java-06inheritance
java-06inheritancejava-06inheritance
java-06inheritance
Arjun Shanka
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
Tech_MX
 
Java Programming - Inheritance
Java Programming - InheritanceJava Programming - Inheritance
Java Programming - Inheritance
Oum Saokosal
 

Similar to Java Inheritance | Java Course (20)

Module 4 Effect of Reuse on using Inheritance.ppt
Module 4 Effect of Reuse on using Inheritance.pptModule 4 Effect of Reuse on using Inheritance.ppt
Module 4 Effect of Reuse on using Inheritance.ppt
ramlingams
 
Inheritance in Java is a mechanism in which one object acquires all the prope...
Inheritance in Java is a mechanism in which one object acquires all the prope...Inheritance in Java is a mechanism in which one object acquires all the prope...
Inheritance in Java is a mechanism in which one object acquires all the prope...
Kavitha S
 
Ayan Das_25300121057.pptx
Ayan Das_25300121057.pptxAyan Das_25300121057.pptx
Ayan Das_25300121057.pptx
Ayan974999
 
Inheritance in Java.pdf
Inheritance in Java.pdfInheritance in Java.pdf
Inheritance in Java.pdf
kumari36
 
Inheritance used in java
Inheritance used in javaInheritance used in java
Inheritance used in java
TharuniDiddekunta
 
Inheritance
InheritanceInheritance
Inheritance
disha singh
 
Inheritance
InheritanceInheritance
Inheritance
ssusera6878f
 
Unit3 part2-inheritance
Unit3 part2-inheritanceUnit3 part2-inheritance
Unit3 part2-inheritance
DevaKumari Vijay
 
Unit3 inheritance
Unit3 inheritanceUnit3 inheritance
Unit3 inheritance
Kalai Selvi
 
Inheritance
InheritanceInheritance
Inheritance
Siddhesh Palkar
 
Inheritance
InheritanceInheritance
Inheritance
yugandhar vadlamudi
 
Inheritance
InheritanceInheritance
Inheritance
prashant prath
 
Inheritance and Polymorphism
Inheritance and PolymorphismInheritance and Polymorphism
Inheritance and Polymorphism
KartikKapgate
 
types of inheritancec , inheritance ,data structures and algorithim oresentat...
types of inheritancec , inheritance ,data structures and algorithim oresentat...types of inheritancec , inheritance ,data structures and algorithim oresentat...
types of inheritancec , inheritance ,data structures and algorithim oresentat...
starkdevil15
 
E -COMMERCE.ppt
E -COMMERCE.pptE -COMMERCE.ppt
E -COMMERCE.ppt
classall
 
Inheritance in java.pptx_20241025_101324_0000.pptx.pptx
Inheritance in java.pptx_20241025_101324_0000.pptx.pptxInheritance in java.pptx_20241025_101324_0000.pptx.pptx
Inheritance in java.pptx_20241025_101324_0000.pptx.pptx
saurabhthege
 
Interfaces .net
Interfaces .netInterfaces .net
Interfaces .net
ajeela mushtaq
 
L7 inheritance
L7 inheritanceL7 inheritance
L7 inheritance
teach4uin
 
L7 inheritance
L7 inheritanceL7 inheritance
L7 inheritance
teach4uin
 
Inheritance in oops
Inheritance in oopsInheritance in oops
Inheritance in oops
Hirra Sultan
 
Module 4 Effect of Reuse on using Inheritance.ppt
Module 4 Effect of Reuse on using Inheritance.pptModule 4 Effect of Reuse on using Inheritance.ppt
Module 4 Effect of Reuse on using Inheritance.ppt
ramlingams
 
Inheritance in Java is a mechanism in which one object acquires all the prope...
Inheritance in Java is a mechanism in which one object acquires all the prope...Inheritance in Java is a mechanism in which one object acquires all the prope...
Inheritance in Java is a mechanism in which one object acquires all the prope...
Kavitha S
 
Ayan Das_25300121057.pptx
Ayan Das_25300121057.pptxAyan Das_25300121057.pptx
Ayan Das_25300121057.pptx
Ayan974999
 
Inheritance in Java.pdf
Inheritance in Java.pdfInheritance in Java.pdf
Inheritance in Java.pdf
kumari36
 
Unit3 inheritance
Unit3 inheritanceUnit3 inheritance
Unit3 inheritance
Kalai Selvi
 
Inheritance and Polymorphism
Inheritance and PolymorphismInheritance and Polymorphism
Inheritance and Polymorphism
KartikKapgate
 
types of inheritancec , inheritance ,data structures and algorithim oresentat...
types of inheritancec , inheritance ,data structures and algorithim oresentat...types of inheritancec , inheritance ,data structures and algorithim oresentat...
types of inheritancec , inheritance ,data structures and algorithim oresentat...
starkdevil15
 
E -COMMERCE.ppt
E -COMMERCE.pptE -COMMERCE.ppt
E -COMMERCE.ppt
classall
 
Inheritance in java.pptx_20241025_101324_0000.pptx.pptx
Inheritance in java.pptx_20241025_101324_0000.pptx.pptxInheritance in java.pptx_20241025_101324_0000.pptx.pptx
Inheritance in java.pptx_20241025_101324_0000.pptx.pptx
saurabhthege
 
L7 inheritance
L7 inheritanceL7 inheritance
L7 inheritance
teach4uin
 
L7 inheritance
L7 inheritanceL7 inheritance
L7 inheritance
teach4uin
 
Inheritance in oops
Inheritance in oopsInheritance in oops
Inheritance in oops
Hirra Sultan
 
Ad

More from RAKESH P (17)

Java Comments | Java course
Java Comments | Java courseJava Comments | Java course
Java Comments | Java course
RAKESH P
 
Java Constructors | Java Course
Java Constructors | Java CourseJava Constructors | Java Course
Java Constructors | Java Course
RAKESH P
 
How to get selected in a Software Product Company ?
How to get selected in a Software Product Company ?How to get selected in a Software Product Company ?
How to get selected in a Software Product Company ?
RAKESH P
 
Types of Software Developers
Types of Software DevelopersTypes of Software Developers
Types of Software Developers
RAKESH P
 
Tokenization using nlp | NLP Course
Tokenization using nlp | NLP CourseTokenization using nlp | NLP Course
Tokenization using nlp | NLP Course
RAKESH P
 
Natural language processing basics
Natural language processing basicsNatural language processing basics
Natural language processing basics
RAKESH P
 
Supervised learning
Supervised learningSupervised learning
Supervised learning
RAKESH P
 
Machine learning real time applications
Machine learning real time applicationsMachine learning real time applications
Machine learning real time applications
RAKESH P
 
What is machine learning
What is machine learning What is machine learning
What is machine learning
RAKESH P
 
Strategy design pattern
Strategy design patternStrategy design pattern
Strategy design pattern
RAKESH P
 
State design pattern
State design patternState design pattern
State design pattern
RAKESH P
 
Null object design pattern
Null object design patternNull object design pattern
Null object design pattern
RAKESH P
 
Memento design pattern
Memento design patternMemento design pattern
Memento design pattern
RAKESH P
 
Chain of responsibility design pattern
Chain of responsibility design patternChain of responsibility design pattern
Chain of responsibility design pattern
RAKESH P
 
Interpreter Design Pattern real-time examples
Interpreter Design Pattern real-time examplesInterpreter Design Pattern real-time examples
Interpreter Design Pattern real-time examples
RAKESH P
 
What is String in Java?
What is String in Java?What is String in Java?
What is String in Java?
RAKESH P
 
Visitor design pattern
Visitor design patternVisitor design pattern
Visitor design pattern
RAKESH P
 
Java Comments | Java course
Java Comments | Java courseJava Comments | Java course
Java Comments | Java course
RAKESH P
 
Java Constructors | Java Course
Java Constructors | Java CourseJava Constructors | Java Course
Java Constructors | Java Course
RAKESH P
 
How to get selected in a Software Product Company ?
How to get selected in a Software Product Company ?How to get selected in a Software Product Company ?
How to get selected in a Software Product Company ?
RAKESH P
 
Types of Software Developers
Types of Software DevelopersTypes of Software Developers
Types of Software Developers
RAKESH P
 
Tokenization using nlp | NLP Course
Tokenization using nlp | NLP CourseTokenization using nlp | NLP Course
Tokenization using nlp | NLP Course
RAKESH P
 
Natural language processing basics
Natural language processing basicsNatural language processing basics
Natural language processing basics
RAKESH P
 
Supervised learning
Supervised learningSupervised learning
Supervised learning
RAKESH P
 
Machine learning real time applications
Machine learning real time applicationsMachine learning real time applications
Machine learning real time applications
RAKESH P
 
What is machine learning
What is machine learning What is machine learning
What is machine learning
RAKESH P
 
Strategy design pattern
Strategy design patternStrategy design pattern
Strategy design pattern
RAKESH P
 
State design pattern
State design patternState design pattern
State design pattern
RAKESH P
 
Null object design pattern
Null object design patternNull object design pattern
Null object design pattern
RAKESH P
 
Memento design pattern
Memento design patternMemento design pattern
Memento design pattern
RAKESH P
 
Chain of responsibility design pattern
Chain of responsibility design patternChain of responsibility design pattern
Chain of responsibility design pattern
RAKESH P
 
Interpreter Design Pattern real-time examples
Interpreter Design Pattern real-time examplesInterpreter Design Pattern real-time examples
Interpreter Design Pattern real-time examples
RAKESH P
 
What is String in Java?
What is String in Java?What is String in Java?
What is String in Java?
RAKESH P
 
Visitor design pattern
Visitor design patternVisitor design pattern
Visitor design pattern
RAKESH P
 
Ad

Recently uploaded (20)

Does Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should KnowDoes Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should Know
Pornify CC
 
The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptxWebinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
MSP360
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and MLGyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
Gyrus AI
 
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Raffi Khatchadourian
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
CSUC - Consorci de Serveis Universitaris de Catalunya
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 
Does Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should KnowDoes Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should Know
Pornify CC
 
The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptxWebinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
MSP360
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and MLGyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
Gyrus AI
 
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Raffi Khatchadourian
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 

Java Inheritance | Java Course

  • 2. Java Inheritance ● Inheritance can be defined as the process where one class acquires the properties (methods and fields) of another. ● The class which inherits the properties of other is known as subclass (derived class, child class) and the class whose properties are inherited is known as superclass (base class, parent class).
  • 3. extends keyword ● It is used to inherit the properties of a class. class Parent { } class Child extends Parent { }
  • 4. Types of Inheritance - Single Inheritance ● When a class extends another one class only. Class A { } Class B extends A { }
  • 5. Types of Inheritance - Multilevel Inheritance ● One can inherit from a derived class, thereby making this derived class the base class for the new class. Class X{ } Class Y extends X{ } Class Z extends Y{ }
  • 6. Types of Inheritance - Hierarchical Inheritance ● One class is inherited by many sub classes. Class X{ } Class Y extends X{ } Class Z extends X{ }
  翻译: