I am implementing an ArrayList of objects which are of type StudentInfo for this course registration system I am making. The class StudentInfo contains many variables. I want to do a few things to the ArrayList. The first is search the ArrayList's Objects for a particular field like SocialSecurityNumber. Secondly, I want to be able to access the variables within an object as well as send a copy of the object over a socket connection. I have seen implementations of casting the list into an array which has type Object, but I can not access any of the methods in StudentInfo objects through that. I am really confused, if anyone could help I would appreciate it alot.
You will have to cast the arraylist element you retrieve to it's appropriate type, in this case, studentInfo, then use that reference to access the SSN vsriable, or access the method that will get you the SSN variable.
------------------ Bosun SCJP for the Java� 2 Platform
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley