View Single Post
  #3 (permalink)  
Old 07-04-2007, 06:26 AM
Heather Heather is offline
Senior Member
 
Join Date: Jun 2007
Posts: 164
Heather is on a distinguished road
jack is right
I give you an example so you understand
Code:
Object obj = null; while (it.hasnext()) { obj = (Vehicle ) it.next(); if (obj instanceof Truck auxVehicle = (Truck)obj; if (obj instanceof car) auxVehicle = (car)obj; }
Reply With Quote