pong lai pong wrote:
it prints : "Elements of vector:[Student@19821f]"
what did i do wrong? the name doesnt show up. does it mean that the vector has different elements in it?
please help me im a total noob
sVector is a Vector
You are printing Vector but not Student Name.
pong lai pong
Joined: Aug 02, 2011
I wanted to seee the name David and he student number which is 1....because im gonna manipulate it later...
but i dont know how to access it
You'll need to override the toString() method in class Student to print out something useful. Otherwise it will inherit the implementation from the super class, which in this case is Object. This implementation returns the class name, followed by an @ and the hexadecimal representation of the hash code.