public class Deque<Item> implements Iterable<Item> {
private int N; // size of the list
private Node first;
private Node last;
public Deque() {
private class Node {
private Item item;
private Node next;
private Node prev;
}
}
}
I keep getting an error that I have an illegal modifier for my private class Node and that only final or abstract is permitted. But the Node class can't stand on its own so I don't think static is needed. Is there something wrong with how the item and the Nodes are declared in the private class? How can I resolve this error?