This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
when i am going through java.lang pck,i saw the classes mentioned under this pck,i found that object is one class under this pck, but i also knew that object class is the superclass of all classes. how is this possible
hi bollu, The API has the specifications for all the classes. Object is a class in the end. It is also the superclass for all classes. The API must specify Objects constructor, methods, etc. This it does in the java.lang package which is available to all programes by default. Regds. Rahul
i think the confusion is between package hierarchy and object hierarchy, which has little to do with each other, but the asker thought they are related. there are questions on mocks that try to confuse you about them (e.g., what is the superclass of awt event classes? surely it is not in the java.awt!) therefore the confused feeling is legit, esp. when the java designers seem to be placing related classes randomly in unrelated packages. at least some of the time.