Tuesday, July 15, 2008

unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details Vector Hashmap Hashtable

C:\_jdk1.6\bin>javac HashTest.java
Note: HashTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

If you get something like this error message when running your code, it's because you're not using generics, and you're not safely putting stuff into your collection classes.

If you actually have solid code that should compile, just use the -Xlint option. That's an ell (l) after the X, not a one (1)

C:\_jdk1.6\bin>javac HashTest.java -Xlint

No comments: