Hi,
I'm trying to return the name of an object that I have added to a vector. I'm using
|
Code:
|
Vector<animal> cats = new Vector<animal>();
cats.addElement(new cat(0));
System.out.println("Type of object " + cats.get(i)); |
But this returns:
Type of object arrayofobjects$cat@10b30a7
And I need it to return something more like "Type of object: Cat"
how can I do this?
Thanks,
Nate