How can a class, extending another class, extends Object class though multiple inheritance is not allowed?

Because although multiple inheritance isn't allowed, one class can inherit from another which can inherit from another - and eventually the class at the top of that chain will inherit from object (it'll do that if you don't specify any specific class for it to inherit from. ).

Thanks a ton! – Anshul Aug 3 at 18:27 @Anshul no problem! That's what we're here for.

– berry120 Aug 3 at 18:43.

There are two similar sounding concepts related to inheritance Multiple Inheritance and Multi-Level Inheritance. Multiple Inheritance is not allowed in java. This stops a class from inheriting multiple classes.

For example we can't declare a class as: Class C extends A, C But as multilevel inheritance is allowed, extending of class B, which extends class A, by class C is allowed. So class hierarchies like Class B extends A and Class C extends B is allowed.

Thnx I gt my answer... – Anshul Aug 3 at 18:41 +1 - For, yeah I mean, if you wanna get all technical about it... ;) jeje.. not but really, good, clear answer. – AJC Aug 3 at 18:58.

Although this is already answered, here is a diferent perspective. Try to think of it in human terms. You can't have 2 biological fathers, but you inherit the traits from your father, your grandfather, great grandfather and so on... In the same way, when you extend a class, that class becomes the parent class and you'll inherit traits from every parent class up the tree.

;).

Multiple inheritance" is different than what you describe - it refers to a single class extending more than one class, such as public class MultipleClass extends ClassA, ClassB What you have described is just a hierarchy of inheritance.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions