This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes Question about Vector Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Question about Vector" Watch "Question about Vector" New topic
Author

Question about Vector

Dave Robbins
Ranch Hand

Joined: Sep 16, 2003
Posts: 131
Hello All;

I've just started getting this warning

/myFile.java:50: warning: [unchecked] unchecked call to addElement(E) as a member of the raw type java.util.Vector
tmp.addElement("foo");

when I compile this code

java.util.Vector tmp = new java.util.Vector();
tmp.addElement("foo");

if I'm not mistaken it started happening when I switched to the 1.5 VM
I'm using Netbeans 4.1 as a development environment
anybody know what that means?

Thanks
Dave
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
It's refering to the new generics feature of 1.5.
Here is a tutorial:
http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf


There is no emoticon for what I am feeling!
Dave Robbins
Ranch Hand

Joined: Sep 16, 2003
Posts: 131
Jeff,

Thanks

Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about Vector