The elements in a PriorityQueue do not follow any particular order, except for the head which is the smallest element. In particular, iteration order is not defined. If you continuously remove
from the queue you will get the elements in natural order (alphabetical in your example).
In any case, it is probably not what you need. Why don't you use your Stack instead?