Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package javaapplication3;
  7.  
  8. /**
  9. *
  10. * @author student
  11. */
  12. public class JavaApplication3 {
  13.  
  14. /**
  15. * @param args the command line arguments
  16. */
  17. public static void main(String[] args) {
  18. MyStack a = new MyStack();
  19. for (int i=0; i < 10; i++){
  20. Integer x = i;
  21. a.push(x);
  22.  
  23. }
  24. System.out.println(a);
  25. System.out.println(a.search(5));
  26. System.out.println(a.pop());
  27. System.out.println(a);
  28. System.out.println(a.peek());
  29. // TODO code application logic here
  30. }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement