Why does java.util.Stack allows me to create a new Stack in an android activity with a simple constructor like:
Stack < ImageView> stack = new Stack< ImageView>();
and i cannot do the same with java.util.Queue? Shouldn’t a queue have a similar constructor? Strange enough on http://developer.android.com/reference/java/util/Stack.html it says the Stack has a public constructor and on http://developer.android.com/reference/java/util/Queue.html i don’t see a similar constructor for a queue.. why is that? what is the way to have a Queue of ImageView elements for example?
Thanks.
Because Queue is an interface, you should initial it with a
LinkedList: