Dupe: http://stackoverflow.com/questions/185594/java-generics-syntax-for-arrays
I want to create an array that will hold linked lists of Integer type..
import java.util.LinkedList;
public class Test {
public static void main(String [] args){
LinkedList<Integer> [] buckets = new LinkedList<Integer>[10];
}
}
I get an error saying: Cannot create a generic array of LinkedList
Why is this? Can it be solved?