What is the difference between class and object in Java?

LAST READ: APR 13 2024 | Q. BY: MAHAVEER SWAMI

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

Donate Us: Support to GDATAMART

LifeStyle & Fun

© 2024 GDATAMART.COM (All Rights Reserved)