What is object class in Java with example?

The Object class is the parent class of all the classes in java by default . In other words, it is the topmost class of java. The Object class is beneficial if you want to refer any object whose type you don’t know. Notice that parent class reference variable can refer the child class object, know as upcasting.

Sizin İçin Seçtik  How do you know if two objects are equal?

Leave a Reply

Your email address will not be published. Required fields are marked *