Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Daisy Brown   on Oct 13 In Java Category.

  
Question Answered By: Phoebe Brown   on Oct 13

Vector accepts classes  of Object type, so you can add any object into that.
But when you retrieve object from that Vector, object will be in the form of
Object, so you need to cast it into your custom class. Then you can use that.
for example: ((myclass)id.elementAt(i)).myMethod();

Share: