Error javac -Xlint TestTwelve.java
TestTwelve.java:21: warning: [unchecked] unchecked call to add(E) as a member of
the raw type java.util.Vector
"This is the consequence of a somewhat unfortunate limitation of generic types in Java.
For compatibility, the compiler translates all typed array lists into raw ArrayList objects
after checking that the type rules were not violated. In a running program, all array lists
are the same—there are no type parameters in the virtual machine. Thus, the casts
(ArrayList) and (ArrayList<Employee>) carry out identical runtime checks.
There isn’t much you can do about that situation. When you interact with legacy code,
study the compiler warnings and satisfy yourself that the warnings are not serious. "