This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi All, I think the reason was, They designed a class named 'Object' which had a few really good methods and then they used the benefits of inheritance. So now whenever we define a class, we have a few methods from the Object class as well.
Can anybody out there, give a really good explaination about this. I think there is much much more than, what appears here.
Impossible is I M Possible
Joined: May 15, 2001
In Java it is important to understand what the definition of an object is.
An object is a class instance or an array
This definition is slightly different from that of SmallTalk, C++ and a host of other OO languages.
The reason this is significant is that Interfaces in Java are not considered Objects and therefore, we are allowed to implement more than one Interface while only extending only one direct Superclass. Other languages allow for inheritence from more than one superclass (multiple polymorphism), in java this can only be achieved by abstract classes using other abstract classes.