W
Wes Harrison
I get a compiler warning:
ClassA.java:195: warning: [unchecked] unchecked cast
found : java.lang.Object
required: java.util.ArrayList<java.lang.Integer>
in the following code:
ArrayList<Integer> myList = new ArrayList<Integer>;
ArrayList<Integer> clone = (ArrayList<Integer>)myList.clone();
that I would like to get rid of but I can't see why it is a warning at all.
Can anyone explain why this is a warning and the way to code around it?
Thanks,
Wes
ClassA.java:195: warning: [unchecked] unchecked cast
found : java.lang.Object
required: java.util.ArrayList<java.lang.Integer>
in the following code:
ArrayList<Integer> myList = new ArrayList<Integer>;
ArrayList<Integer> clone = (ArrayList<Integer>)myList.clone();
that I would like to get rid of but I can't see why it is a warning at all.
Can anyone explain why this is a warning and the way to code around it?
Thanks,
Wes