• Post Reply Bookmark Topic Watch Topic
  • New Topic

Root Interface & Object class doubt.  RSS feed

 
Prakash Gnana Shiva
Greenhorn
Posts: 7
Chrome Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We knew that "Object class is the root class" for all classes including our program.

And Java does not support multiple Inheritance.

My question is that if My class(Say Abcd) extends some other class, and how it is possible to extend Object class to Abcd .

and what is the root interface of all interfaces ?
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prakash Dahagam wrote:My question is that if My class(Say Abcd) extends some other class, and how it is possible to extend Object class to Abcd .

The root class doesn't have to be a direct super class. There could be many classes in the hierarchy between a given class and Object.

You can compare it to a family tree. If class A extends Object and class B extends A, then you can see class A as class B's father and Object as its grandfather.

and what is the root interface of all interfaces ?

There is no such thing. Interfaces have a less structured hierarchy. There is extension, but one interface can extend multiple other interfaces.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!