Have you checked the Java tutorial on collections?
http://java.sun.com/docs/books/tutor...ons/index.html
Coding in eclipse (free) can help catch syntax errors (it underlines them in red as you type, just like word)
http://www.eclipse.org/
Have you checked the Java tutorial on collections?
http://java.sun.com/docs/books/tutor...ons/index.html
Coding in eclipse (free) can help catch syntax errors (it underlines them in red as you type, just like word)
http://www.eclipse.org/
Fekking logged me out, after I finished writing a long post.![]()
Anyways, real quick as I don't have the time to type it out again, perhaps tonight if I can get a minute.
Try
boolean contains(Object elem)
Tests if the specified object is a component in this vector.
In the api that Drone linked too. That method looks like what you are looking for.
..::Noobs don't own themselves!::..
Reading through the Vector page, looks like Java vectors are similiar to arrays of void pointers in C. Any class object can be added to a vector. Is this correct?
If so, can you use the getClass() method to do what you want? Verify the class then cast appropriately to remove the compile problems?
The .Org's MTW Reference Guide Wiki - now taking comments, corrections, suggestions, and submissions
If I werent playing games Id be killing small animals at a higher rate than I am now - SFTS
Si je n'étais pas jouer à des jeux que je serais mort de petits animaux à un taux plus élevé que je suis maintenant - Louis VI The Fat
"Why do you hate the extremely limited Spartan version of freedom?" - Lemur
Should be able to use a generic for this.
Vector <String> myVector;
Last edited by Phatose; 03-08-2006 at 08:02.
Yes ! This was what i was looking for. Muchos Gracias !Originally Posted by Phatose
![]()
Yes, Iraq is peaceful. Go to sleep now. - Adrian II
Bookmarks