| Author |
Refrence variable or object
|
Arun Maalik
Ranch Hand
Joined: Oct 25, 2005
Posts: 216
|
|
Dear sir in the following code like Button b=new Button(); what can we say b as b is a rfrence variable or b is an object of class Button. and if it is a refrence variable then where is object.
|
 |
Gowher Naik
Ranch Hand
Joined: Feb 07, 2005
Posts: 643
|
|
|
b is reference to a object of type button.Button object is stored on heap.
|
 |
Aum Tao
Ranch Hand
Joined: Feb 14, 2006
Posts: 210
|
|
Also, objects dont have a name. Therefore, we can't access them directly. We use references to access the objects.
|
SCJP 1.4 85%
|
 |
Arun Maalik
Ranch Hand
Joined: Oct 25, 2005
Posts: 216
|
|
|
Thanks sir
|
 |
 |
|
|
subject: Refrence variable or object
|
|
|