What is the Difference Between a Class and an Object in Java ?

A Class is a template or a blue print of an Object to be created. An Object is an instance of a Class. A Class defines the methods and member variables. But an Object populates the values of the member variables.

Therefore a class is a blueprint that you use to create objects. An object is an instance of a class – it is a concrete 'thing' that you made using a specific class.

Most of the OOPS concepts are valid only when an Object is created.



You May Interest

What is the Difference Between a Cookie and a Session Object in J ...

What are the Different Scopes of a JSP Object ?

When Does JVM Call the Finalize Method in Java ?

What is the Main Benefit of IOC Principle in Java ?

What is Difference Between Include Directive and Include Action o ...