Hi, The Object class is the only top level class in Java because as already posted above, there must be some common functionality inherent in all objects, one such commonly used functionality is String representation of the object. Also one another important aspect of using a single top level class is to facilitate the use of Single Rooted Hierarchy. Besides its several purposes, one important feature obtained is that you can use the generic Object in your code and decide the actual (required) type of object dynamically during runtime.
You can also find out more reasons by further reading. Hope it helps
There must be some common functionality inherent in all objects ,,,
Don't forget that was a decision of the language designer, not a cosmic truth. You can find other languages that don't have a common ancestor class. That doesn't matter much in Java but one day you'll get bored with Java and try the Next Big Language that might not agree.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi