aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Refrence variable or object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Refrence variable or object" Watch "Refrence variable or object" New topic
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Refrence variable or object
 
Similar Threads
refrence variable of object
confuse in {Parent p = new Child();}
what is diff betwn object and instance
whats the difference between Objects and reference variables?
class question