T
the.real.doctor.zoidberg
Hi,
i'm having some problems with instantiating a vector of vectors of
integers.
because i can't iterate them.
// i can create the "main" vector, but i still need to instantiate all
100 Vectors of Integers
Vector<Vector<Integer>> skips = new Vector<Vector<Integer>>(100);
// the problem with this is that hasMoreElements returns false
Enumeration it = skips.elements();
if (it.hasMoreElements())
elem = (Vector<Integer>)it.nextElement();
// also suffers from the same problem... it says that it has no
elements
ListIterator<Vector<Integer>> it = skips.listIterator();
if (it.hasNext())
elem = new Vector<Integer>();
How do i fix this?
Thanks in advance!
i'm having some problems with instantiating a vector of vectors of
integers.
vectors) are null. But i am unable to point them to a *new* vectorFrom the debugger i can see that all of the vector elements (which are
because i can't iterate them.
// i can create the "main" vector, but i still need to instantiate all
100 Vectors of Integers
Vector<Vector<Integer>> skips = new Vector<Vector<Integer>>(100);
// the problem with this is that hasMoreElements returns false
Enumeration it = skips.elements();
if (it.hasMoreElements())
elem = (Vector<Integer>)it.nextElement();
// also suffers from the same problem... it says that it has no
elements
ListIterator<Vector<Integer>> it = skips.listIterator();
if (it.hasNext())
elem = new Vector<Integer>();
How do i fix this?
Thanks in advance!