Sunday, 6 May 2018

what is Class and Object in JAVA?


What is object?

Anything which can be seen which can be touched even object.
“Every real world entity is an object.”

 Every object has following 2 characteristic.

1-Attributes:
This is the properties of the object such as weight, height, color, etc.

2-Behaviours:
This is the functionality of object. Such as moving running sleeping flying etc. an object is nothing without attribute and behavior.

What is class?

Group of those objects that have common attributes and behavior is called a class. A class defines attribute and behavior of the object. A class acts as the blueprint for the object.

No comments:

Post a comment

Popular Posts