The moose likes Beginning Java and the fly likes Why java.lang.Object class is concrete class? Why not it is a abstract class? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Why java.lang.Object class is concrete class? Why not it is a abstract class? " Watch "Why java.lang.Object class is concrete class? Why not it is a abstract class? " New topic
Author

Why java.lang.Object class is concrete class? Why not it is a abstract class?

kopparapu v kiran kumar
Greenhorn

Joined: Oct 16, 2008
Posts: 25
Merry Crismastmas!!

I have a doubt like this:

Why java.lang.Object class is concrete class? Why not it is a abstract class?

What could be the reason behind making it as a concrete class??


Please clarify my doubt....

Thanks in advance!!
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

kopparapu v kiran kumar wrote:
Why java.lang.Object class is concrete class? Why not it is a abstract class?

Java Designer might not be wanted to force you to override a method from object class.
Jesper de Jong
Java Cowboy
Bartender

Joined: Aug 16, 2005
Posts: 12950
    
    3

Seetharaman Venkatasamy wrote:Java Designer might not be wanted to force you to override a method from object class.

That can't be the reason; an abstract class does not need to have any abstract methods that you would be forced to override.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Jesper de Jong wrote:an abstract class does not need to have any abstract methods that you would be forced to override.

fine. but what is the need to make a class as an abstract, if the class does not have abstract method?
Jesper de Jong
Java Cowboy
Bartender

Joined: Aug 16, 2005
Posts: 12950
    
    3

Because a class may still represent some abstract thing that you don't want to be able to instantiate directly, even if it doesn't have any abstract methods.

Back to the original question: I guess that is just how the Java language designers chose it to be. Someone posted a long answer here: Why java.lang.Object is not abstract?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why java.lang.Object class is concrete class? Why not it is a abstract class?
 
Similar Threads
A small doubt regarding Abstract classes...
Doubt on Abstract classes
abstract class
Doubt on abstract class with Inner class concept
Have doubt in Interface.