public static void printArrayList(ArrayList personArrayList)
The statement “System.out.println ( personArrayList.get
(0).getFirstName() );”
works fine in the class DataInputDemo where the ArrayList is
instantiated but not in the printArrayList method.
personArrayList is of type ArrayList and thus, you have to cast the
elements to Person:
public static void printArrayList(ArrayList<Person> personArrayList)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden