0% found this document useful (0 votes)
2 views8 pages

Java Ex 2,4

The document outlines a hierarchy of classes in object-oriented programming, specifically focusing on inheritance and method overriding. It describes the relationships between Animal, Father, GrandFather, and Son classes, along with their respective properties and behaviors. Additionally, it mentions the presence of demo classes with main methods to demonstrate these concepts.

Uploaded by

jegitow406
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views8 pages

Java Ex 2,4

The document outlines a hierarchy of classes in object-oriented programming, specifically focusing on inheritance and method overriding. It describes the relationships between Animal, Father, GrandFather, and Son classes, along with their respective properties and behaviors. Additionally, it mentions the presence of demo classes with main methods to demonstrate these concepts.

Uploaded by

jegitow406
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Animal Class

Dog class Extending Animal class properties n behaviour

MethodOverriding class with main method


MethodOverriding
Father class

Son class extending Father class properties n Behaviour

Demo class with main method


GrandFather class

Father class inheriting GrandFather class Behaviour n properties

Son class inheriting Father class Behaviour n properties


Demo class with main method
GrandaFather class

Father class inheriting GrandFather’s properties n behaviour

Son class inheriting GrandFtaher’s properties n behaviour


Son2 class inheriting GrandFtaher’s properties n behaviour

Demo class with main method


Command Line Argument

You might also like