示例代码:
Queue<Integer> queue = new LinkedList<Integer>();
for (int i = 1; i <= 100; i ++) queue.add(i);
while (queue.isEmpty() == false) {
Integer num = queue.poll();
System.out.println(num);
}
2022-05-19 02:15:49
示例代码:
Queue<Integer> queue = new LinkedList<Integer>();
for (int i = 1; i <= 100; i ++) queue.add(i);
while (queue.isEmpty() == false) {
Integer num = queue.poll();
System.out.println(num);
}