Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package javaapplication3;
- /**
- *
- * @author student
- */
- public class JavaApplication3 {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- MyStack a = new MyStack();
- for (int i=0; i < 10; i++){
- Integer x = i;
- a.push(x);
- }
- System.out.println(a);
- System.out.println(a.search(5));
- System.out.println(a.pop());
- System.out.println(a);
- System.out.println(a.peek());
- // TODO code application logic here
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement