Hi There ,
I'm trying to build a vector full of objects that are made from subclasses written by me . Everything works fine , except I don't know , nor have I been able to find a clear example of how to extract objects out of a Vector and then use them .
At this point i create a vector
Vector elements = new Vector();
Element e = new Element();
I have a method which is supposed to return a String which is part of the e object . Let's say :
how can I extract a certain object out of the vector and access one of it's fields . I tried the obvious :
Element e = elements.elementAt(1);
but thjat doesn't seem to work . How should this be done ?