The abstract method getNextNode generates the error, "cannot make a static reference to the non-static type Node," but only if LinkedList is parameterized. If I remove the generic from LinkedList the error goes away. Why?
public class LinkedList<T> {
Node head;
public LinkedList() {
head = new Node();
}
private class Node {
}
interface stuff {
public Node getNextNode();//ERROR Cannot make a static reference to the non-static type Node
}
}