-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.java
More file actions
35 lines (32 loc) · 1.13 KB
/
Copy pathApp.java
File metadata and controls
35 lines (32 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package queue;
public class App {
public static void main(String[] args) {
SimpleQueue<Integer> exp = new SimpleLinkedQueque<>();
exp.add(1);
exp.add(2);
exp.add(3);
exp.add(4);
exp.add(5);
// System.out.println(exp.getSize());
// System.out.println(exp.peek());
// System.out.println(exp.peek());
// System.out.println(exp.poll());
// System.out.println("size = " + exp.getSize());
// System.out.println(exp.poll());
// System.out.println("size = " + exp.getSize());
// System.out.println(exp.poll());
// System.out.println("size = " + exp.getSize());
// System.out.println(exp.poll());
// System.out.println("size = " + exp.getSize());
// System.out.println(exp.poll());
// System.out.println("size = " + exp.getSize());
// for(Integer a : exp){
// System.out.println(a);
// }
System.out.println(exp.poll());
System.out.println(exp.poll());
System.out.println(exp.poll());
System.out.println(exp.poll());
System.out.println(exp.poll());
}
}