public class Main {
public static void main(String[] args) {
LinkedListQueue llq = new LinkedListQueue(new Node(1));
llq.push(new Node(2));
llq.push(new Node(3));
llq.push(new Node(4));
llq.push(new Node(5));
llq.push(new Node(6));
llq.push(new Node(7));
try {
System.out.println(llq.pop().getData());
System.out.println(llq.pop().getData());
System.out.println(llq.pop().getData());
llq.push(new Node(10));
llq.push(new Node(11));
llq.push(new Node(12));
System.out.println(llq.pop().getData());
System.out.println(llq.pop().getData());
System.out.println(llq.pop().getData());
System.out.println(llq.pop().getData());
System.out.println(llq.pop().getData());
System.out.println(llq.pop().getData());
System.out.println(llq.pop().getData());
System.out.println(llq.pop().getData());
} catch (NullPointerException e) {
System.out.println("Queue is empty.");
}
}
}