The following line of code causes javac
to give an unsafe operation warning:
LinkedList<Node>[] buckets = new LinkedList[bucketCount];
However, when I try to fix that by doing this:
LinkedList<Node>[] buckets = new LinkedList<Node>[bucketCount];
I get a generic array creation
error. How can I solve this?