Computer Science Canada

help with arraylist

Author:  Jmrenzhe [ Sun Nov 29, 2009 10:39 pm ]
Post subject:  help with arraylist

hi, i need help, im trying to use arraylist's .get() method as a parameter in a method when im calling it up, but when i build it i always get "cannot get symbol variable get".

this is my code, its not all there is, but the rest have nothing to do with my problem, i think, just presume that arraylist has stored some objects.
i tried putting other variables in the students2.get() but it still doesnt work.
my method returns an array of two int

code:
       
ArrayList<Student>students2 = new ArrayList<Student>();
int[] arranged = new int[students2.size()];

for (int i = 0; i < students2.size(); i++){
        arranged[i] = displayclass(students2.get(arranged[i] - 1).theLastName(), students2.get(arranged[i + 1] - 1).theLastName(), students2.get(arranged[i] - 1).getID(), students2.get(arranged[i + 1] - 1).get.ID())[0];
        arranged[i + 1] = displayclass(students2.get(arranged[i] - 1).theLastName(), students2.get(arranged[i + 1] - 1).theLastName(), students2.get(arranged[i] - 1).getID(), students2.get(arranged[i + 1] - 1).get.ID())[1];
}

Author:  Jmrenzhe [ Sun Nov 29, 2009 10:56 pm ]
Post subject:  Re: help with arraylist

nvm saw my mistake, fixed it Hit Wall


: