What is the difference between class and object in Java?

Updated By: Mahaveer Swami | 29 May 2019

S

shivani rai

30 May 2019

Object means a real world entity like pen, chair, pencil etc.. . it is a physical as well as logical entity But class is blueprint from which we can create the object. Class is a logical entity. Object is an instance of class.

2 votes

N

Neha kumari

30 May 2019

Object means a real word entity i.e a place, a person,  a bank.

Class is a blueprint of object.

Object is an instance of class.

1 votes

K

Khadirunnisa

02 June 2019

Object is a real world entity but class is a blue print of an object. 

For Example, Vehicle is a class. Car or bike is an object.

We cannot see the class but can see the object.

In Java , class doesn't occupy memory whereas object reference occupies memory.

1 votes

Your Answer

Email Us: hello@gdatamart.com

Legal Policy

International

© 2022 GDATAMART.COM (All Rights Reserved)