what is the purpose of class "Object" which is base class
for all classes?

Answer Posted / piryabrata patro

listen first , when you create object of one class which is not extending any class than , instead of one object , two object will be created and that is nothing but object of Object class and one more thing is no object is created with out it's superclass. So, object of subclass can not be created without it's superclass where Object class comes into picture because by default compiler gives Object class as superclass to all class which is not extending any class at compilation time itself.

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the importance of throws keyword in java?

565


What are serialization and deserialization?

723


Is array serializable java?

515


Can we have multiple public classes in a java source file?

551


What is the use of math abs in java?

547






How do you define a set in java?

508


What is double word?

531


Is list thread safe in java?

487


Why is the main method static?

595


What is difference between filereader and bufferedreader?

527


Given a singly linked list, determine whether it contains a loop or not without using temporary space?

580


What is lazy programming?

561


Who found java?

548


Can a main method be declared final?

581


How to make a non daemon thread as daemon?

545