File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Difference betwen reference variable & object Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Difference betwen reference variable & object" Watch "Difference betwen reference variable & object" New topic
Author

Difference betwen reference variable & object

deepikakasi kasi
Greenhorn

Joined: Oct 08, 2006
Posts: 7
Thanks 4 replying my doubt immediately...

How I got the doubt is that

INSTANCE OF-----Operator is nothing but Subclass object is assigned to super class refernce variable.....Is that Right???


In that I got the doubt of refernce variable & object


with lots of thanks & regards,
Deepika.K.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
INSTANCE OF-----Operator is nothing but Subclass object is assigned to super class refernce variable
I don't understand this statement.

The instanceof expression will evaluate to true when the object assigned to the given reference variable (the left hand of the expression) is an instance of the given (sub)class (the right hand of the expression).

Example:


Code depot of a Java EE / JSF developer | JSF / Eclipse / Tomcat kickoff tutorial | DAO kickoff tutorial | I ♥ Unicode
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Difference betwen reference variable & object
 
Similar Threads
doubt
Doubt in overrididng
Doubt
Object Casting help
Doubt........