Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 20th, 2003, 08:34 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default Vector.contains(Object obj)

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.
__________________
Danish audio books for download at http://www.lytenbog.dk (Danske lydbøger til download).
Reply With Quote
  #2 (permalink)  
Old December 20th, 2003, 08:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I figured it out! I used my own type as argument in the implementation, and not Object. Jacob.
Reply With Quote
  #3 (permalink)  
Old January 10th, 2004, 02:34 PM
Registered User
 
Join Date: Jan 2004
Location: Chennai, tamilnadu, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Object refrence not set to an instance of an obj viral648 ASP.NET 1.0 and 1.1 Professional 1 January 2nd, 2007 01:11 PM
Object reference not set to an instance of an obj nrathod_97 BOOK: Beginning VB.NET Databases 4 June 21st, 2005 06:35 PM
Object reference not set to an instance of an obj. Dwizz VB.NET 2002/2003 Basics 8 June 1st, 2005 08:28 AM
vector.add(); -- Reference or Object? Firedawn Servlets 2 February 23rd, 2005 01:04 AM
vector.add(); chikodi Servlets 2 October 23rd, 2003 02:03 AM



All times are GMT -4. The time now is 12:42 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.