File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
 
Similar Threads
Vector conversion problem
Why is this an unchecked cast?
add element to vector
What does it mean?
Creating a vector