Thomas Bigbee wrote:
the below works fine (as a test of code conformation), Eclipse on the other hand is not letting me add the second pair of <xxx> type brackets without telling me that its an error. I've tried the secord pair of brackets in six places.
I'm not entirely sure what you mean here, but your code compiles fine in eclipse for me. Here's a simpler example which should work:
Code:
void doIt() {
List <Integer>a = new ArrayList<Integer>();
a.add(new Integer(1));
a.add(new Integer(2));
ArrayList <Integer> b = new ArrayList<Integer>(a);
for(Integer i : b) {
System.out.println(i);
}
}
I have turned off these warnings in Eclipse by using "Preferences" / "Java" / "Compiler" / "Errors/Warning" / "J2SE 5.0 options" and selecting Ignore for "unchecked generic type operation".
HTH