F:\practice\newjava>javac TestBoxing.java Note: TestBoxing.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
F:\practice\newjava>javac -Xlint TestBoxing.java TestBoxing.java:14: warning: [unchecked] unchecked call to add(int,E) as a member of the raw type java.util.ArrayList l.add(0, new Integer(59)); ^ TestBoxing.java:15: warning: [unchecked] unchecked call to add(int,E) as a member of the raw type java.util.ArrayList l.add(1, num); // auto boxing ^ 2 warnings
What are these warnings? What is an unchecked or unsafe operation?
It is "compulsory" to use 1.5 source level features when you are compiling with the 1.5 source level (logical isn't it?). There's no good reason not to (the "I don't understand it" reasoning is a bit silly).