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

Username:   Password: 
 RegisterRegister   
 Getting the value of a datafield in an arraylist of objects
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Fasih




PostPosted: Mon May 30, 2011 10:53 pm   Post subject: Getting the value of a datafield in an arraylist of objects

How would I get the value of an arraylist of objects. The arraylist of objects is called, and it is called for another class in which it initializes two data fields.

How would I get the value of the specific point in the arraylist? like if I had an arraylist of objects of size 10, how would i get the value of the two datafields the object is pointing to?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon May 30, 2011 10:57 pm   Post subject: RE:Getting the value of a datafield in an arraylist of objects

check the docs for the version of Java that you are using. E.g. http://download.oracle.com/javase/6/docs/api/java/util/ArrayList.html for java 6
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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: