An “Object is an Instance
of a Class”.
Or
An Object represents real world
entities with certain characteristics such as
·
STATE : Represents Data (Value) of an object.
BEHAVIOR : Represents the functionality of an
object . e.g. : Deposit , withdraw,…
·
IDENTITY : Every object is designated with a
unique ID by the JVM. And this ID can only be recognized by JVM.
3 Ways of Creating an Object :
1) MyDog mDog = new MyDog ();
Terminology :
MyDog mDog =
new MyDog ();
(Object Reference ) ( Reference Variable ) ( Keyword)
( Constructor )
or
2) String myString =
“ Welcome to JavaNoobs !!!” ;
or
3) String myString =
“ I see I remember !!! ”;
Class :
A Class is a blue print of object.
or
We can say that a class is a software blueprint of an
object used to instantiate many individual objects .
A class consists of Attributes and methods.
No comments:
Post a Comment