Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can a class be a super class and a sub-class at the same time? Give example.



Can a class be a super class and a sub-class at the same time? Give example...

Answer / hrindows@gmail.com

If there is a hierarchy of inheritance used, a class can be a super class for another class and a sub-class for another one at the same time.
In the example below, continent class is sub-class of world class and it’s super class of country class.
public class world {
..........
}
public class continenet extends world {
............
}
public class country extends continent {
......................
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is difference between protected and private?

0 Answers  


What is a JAR file?

0 Answers  


Can you run the product development on all operating systems ?

1 Answers  


using equals method overriding which objects are compared?i.e same class objects or other class objects?Explain me.

4 Answers  


What are peerless components in java programming?

0 Answers  


What is the use of toarray () in java?

0 Answers  


How do you convert string to int in java?

0 Answers  


What are assertions in java?

1 Answers   Impetus,


what is collatration?

0 Answers  


Print Vertical traversal of a Binary Tree.

0 Answers   Amazon,


How to create two different thread class inside a main function?

1 Answers  


What is the use of inner class?

0 Answers  


Categories