Sunday, November 20, 2016

The difference between class and object

“The difference between class and object"

Class
i) A class is a way of binding the data and
associated methods in a single unit.

ii) Whenever we start executing a
program, the class will be loaded into
main memory with the help of
loader subsystem (a part of JVM) only
once.

iii) When the class id defined there is no
memory space for data members
class.


Object

i) Class variable is known as an object
class.

ii) After loading the class into main
memory, objects can be created in n
number.

iii) When an object is created we get the
memory space for data members of the
class.

No comments:

Post a Comment