TOP CATEGORIES

×

What is the difference between class and object in Java?

S

shivani rai

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

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

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: advertise@gdatamart.com

Donate: To Support US

© 2024 GDATAMART.COM (All Rights Reserved)