• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Root Interface & Object class doubt.

 
Greenhorn
Posts: 7
Firefox Browser Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
keep an eye out for scorpions and black widows. But the tiny ads are safe.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic