-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
30 lines (27 loc) · 817 Bytes
/
Main.java
File metadata and controls
30 lines (27 loc) · 817 Bytes
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
package queueLList;
import java.util.Random;
public class Main {
public static void main(String[] args) {
QueueLList myQueue=new QueueLList();
myQueue.enQueue(11);
myQueue.enQueue(22);
myQueue.enQueue(33);
myQueue.enQueue(44);
myQueue.print();
myQueue.deQueue();
myQueue.deQueue();
myQueue.print();
myQueue.enQueue(77);
myQueue.enQueue(88);
myQueue.print();
myQueue.smallAndBig();
System.out.println("**************************************");
// queue with 10 element Random form 1 : 1000 .
QueueLList q2=new QueueLList();
Random random=new Random();
for (int i = 0; i < 10; i++) {
q2.enQueue(random.nextInt(1000));
}
q2.print();
}
}