| Author |
ArrayList
|
Cougar Vis
Greenhorn
Joined: May 12, 2004
Posts: 19
|
|
Me using the ArrayList library from Java for O.O programming, but i am not quite sure one 3 little things 1.Can i assign the data into a specific slot E.g "banana" a string into slot 3? 2.How do i add a data, do i use "add.xXxX"? or use "set", in O.O prgramming environment? 3.How do i recall the data from a specific slot? Using the example in #1. Waiting for reply & Thanx in advance Respect
|
 |
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
|
|
Refer to the API for ArrayList... http://java.sun.com/j2se/1.5.0/docs/api/java/util/ArrayList.html In particular, note the methods: add(int index, E element)get(int index)
|
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
|
 |
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
|
|
|
Moving this to the Intermediate forum...
|
[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
|
 |
 |
|
|
subject: ArrayList
|
|
|