Java: Why does this code give me "generic array creation error"?

Viewed 41

Why does the following code result in a "generic array creation error" at compile time?

public class Trie<Value> {
    private class Node {
        private Node[] links = new Node[256];
        private Object val;
    }
}

Error message: Trie.java:3: error: generic array creation 
        private Node[] links = new Node[256];
0 Answers
Related