Code example for Queue

Methods: addAll

0
	private Queue<Object> queue;
 
	@Before 
	public void setup() { 
		queue = new PriorityQueue<Object>();
		queue.addAll(Arrays.asList(("ODJFZCV;;'DFJIJDSOJF[QICVN,DI".split(""))));
	} 
 
	@Test 
	public void testPoll() { 
		while (!queue.isEmpty()) {
			System.out.print(queue.poll());
		} 
		System.out.println();
	} 
 
	@Test 
	public void testReversePoll() { 
		Queue<Object> reverse = new PriorityQueue<Object>(100,
				Collections.reverseOrder());
Connect your IDE to all the code out there  Get Codota for Java