Untitled

mail@pastecode.io avatar
unknown
java
a year ago
540 B
0
Indexable
Never
package Assignment2;

public class Q2
{
    public static void main(String[] args)
    {
        StackQueue stack = new StackQueue();
        stack.push(1);
        stack.push(17);
        stack.push(40);
        stack.push(52);
        stack.push(76);
        System.out.println("Here is how the stack looks like: " + stack);
        System.out.println("The top integer  in the stack is : " + stack.top());
        System.out.println(stack.pop()); 
        System.out.println("After removing 76 the stack looks like: " + stack);


    }
}