Accessing an Inner Class from a Separate Class
<p>I'm working on an implementation of a double ended queue. I have a class Deque that has an inner class Node to represent the items on the list. I declare the class within Deque (itself a public class) like this:</p>

<pre><code>public class Node(){
//
}
</code></pre>

<p>Now creating new nodes with basic object creation syntax is simple within the Deque class itself:</p>

<pre><code>Node newNode = newNode(arg1);
</code></pre>

<p>However, I want to be able to declare new Nodes from a separate class, a DequeTest class that provides unit testing. When I attempt to create a new Node with the above syntax, I get an error saying that the Node class is not visible. I'm working on a pre-defined API, so I can't create any new public methods. Would a private createNode() method that returns a new Node be optimal? Even that seems like it wouldn't work, because the compiler throws an error when I even use the Node keyword. </p>
