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
posted
0
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).