Consider this is interface:
public interface Node {
Node next();
Node prev();
void setNext(Node next);
void setPrev(Node prev);
void setVal(int val);
int getVal();
}
I want know how I can instantiate this class, for example:
Node p = tail;
I would like to use it something like this.
Node p = new SomeClassThatImplementsNode();