• Post Reply Bookmark Topic Watch Topic
  • New Topic

Class Object  RSS feed

 
abrar alvi
Ranch Hand
Posts: 66
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is the class Object the mother of all classes???


Is there a class called Class???
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
abrar alvi wrote:Why is the class Object the mother of all classes???
Is there a class called Class???

1. Because something has to be.
2. Yes.

Winston
 
abrar alvi
Ranch Hand
Posts: 66
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why it(Object class) is done so?
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
abrar alvi wrote:Why it(Object class) is done so?

Because there are certain methods (eg, equals()) that need to be implemented by ALL classes.

Winston
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!