![]() |
|
#1
|
|||
|
|||
Opperations on objects in ArrayListHello everyone,
I have fllowing problem: I have an ArrayList of Objects that have some methods defined in them as: Class name: Array (contains array of objects) methods: add_object() if the ArrayList name is "l1" what would be the way of calling add_object() by using "l1". I have already tried "l1.get(1).add_object()" kind of statements, those do not work... cheers in advance! |
|
#2
|
|||
|
|||
Re: Opperations on objects in ArrayListHello everyone,
I have fllowing problem: I have an ArrayList of Objects that have some methods defined in them as: Class name: Array (contains array of objects) methods: add_object() if the ArrayList name is "l1" what would be the way of calling add_object() by using "l1". I have already tried "l1.get(1).add_object()" kind of statements, those do not work... cheers in advance! ----- I don't really understand, you have an Arraylist of Arrays? And those arrays are arrays of objects you defined right? you would do CPP / C++ / C Code:
Justin Fox p.s. That is java code, just could find the java tags at top |
Recent GIDBlog
First week of IA training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dynamic allocation and container objects | goochcrabs | CPP / C++ Forum | 1 | 13-Apr-2007 07:48 |
| [C++] Array of pointers to class objects | Całeczka | CPP / C++ Forum | 2 | 03-Dec-2006 12:05 |
| binary search on vector of objects sorted by strings | qboy | CPP / C++ Forum | 8 | 13-Oct-2006 20:14 |
| Array of Objects | chr1zis | CPP / C++ Forum | 11 | 20-Feb-2006 16:42 |
| How to Create C++ Objects at Runtime? | wc3promet | CPP / C++ Forum | 4 | 15-Oct-2004 09:21 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The