Subject: Vector.contains(Object obj)
Posted By: jacob Post Date: 12/20/2003 7:34:06 PM
I am pretty new to Java, and I am trying to use contains to check if an object is contained in some Vector. I am storing my own object in the Vector.

I though that it could be because I didn't implement the equals method, however I tried that in the class and it didn't help. What should I do to make it work!?

It is not only contains, it is also methods such as removeElement, which also take and Object as parameter.

Hope you can help, thanks in advance.

Jacob.
Reply By: jacob Reply Date: 12/20/2003 7:40:22 PM
I figured it out! I used my own type as argument in the implementation, and not Object. Jacob.
Reply By: urkarthik Reply Date: 1/10/2004 1:34:46 PM
hy I got 2 do my project in EJB, JSP & other Java stuffs.. I know only basics in JAVA...

How to step into the project

Regards
Karthik

Go to topic 8397

Return to index page 972
Return to index page 971
Return to index page 970
Return to index page 969
Return to index page 968
Return to index page 967
Return to index page 966
Return to index page 965
Return to index page 964
Return to index page 963