What is the difference between class and object ?

Difference between class and object

Senior Developer Asked on June 19, 2017 in JAVA.
Add Comment
1 Answer(s)

Object :
{i}Object is an instance of a class.
{ii}Memory space is allocated, when it is created.
{iii}It’s a physical entity.
{iv}Object is created many times as per your requirement.

Class:
{i}Class is a blueprint or template from which objects are created.
{ii}Memory space is not allocated , when it is created.
{iii}It’s a logical entity.
{iv}Class is declared once.

 

IT Head Answered on June 28, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.