View Single Post
Old 11-04-2005, 06:36 AM   #2 (permalink)
fitzjj
 
Ultra Techie

Join Date: Oct 2003

Posts: 544

fitzjj

Default

Code:
int xCoord = ((ObjectType)ArrayListName[indexOfObject]).getXCoord();
Something like that. Dont forget you need to cast any object you are accessing in the array list since it can hold any data type. In the above you are casting the object in the array list at poistion indexOfObject as type ObjectType and then calling the getXCoord() method on it to return an int that is stored in the variable xCoord.
fitzjj is offline