When I try:
Queue q = new Queue();
the compiler is giving me an error. Any help?
Also, if I want to i
Queue is an interface. You can't instantiate an interface directly except via an anonymous inner class. Typically this isn't what you want to do for a collection. Instead, choose an existing implementation. For example:
Queue q = new LinkedList();
or
Queue q = new ArrayDeque();
Typically you pick a collection implementation by the performance and concurrency characteristics you're interested in.