Professional Documents
Culture Documents
4 Object
4 Object
4 Object
-------
Every real world entity is an object.
state of an object:
------------------
Value of attribute is state.
10 inch is state of pen.
red is state of pen.
56kg is state of pen.
Q-What is state ?
A- value of attribute is called state
or
it is data.
class:
------
-it is a blueprint or template from which object is created.
-java programmes uses class to create one or more than one object.
-we need to write code to create objects
new classname();
or
new classname(parameters);
main:
-----