Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 help with arraylist
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Jmrenzhe




PostPosted: 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];
}
Sponsor
Sponsor
Sponsor
sponsor
Jmrenzhe




PostPosted: Sun Nov 29, 2009 10:56 pm   Post subject: Re: help with arraylist

nvm saw my mistake, fixed it Hit Wall
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: