MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

collections/QueueDemo.java:14–24  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

12 System.out.println();
13 }
14 public static void main(String[] args) {
15 Queue<Integer> queue = new LinkedList<>();
16 Random rand = new Random(47);
17 for(int i = 0; i < 10; i++)
18 queue.offer(rand.nextInt(i + 10));
19 printQ(queue);
20 Queue<Character> qc = new LinkedList<>();
21 for(char c : "Brontosaurus".toCharArray())
22 qc.offer(c);
23 printQ(qc);
24 }
25}
26/* Output:
278 1 1 1 5 14 3 1 0 1

Callers

nothing calls this directly

Calls 1

printQMethod · 0.95

Tested by

no test coverage detected