Guest User

Untitled

a guest
Apr 12th, 2021
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.72 KB | None | 0 0
  1. public class ProductApp {
  2.  
  3.  
  4.     public static void main(String[] args) {
  5.         ProductStack newStack = new ProductStack();
  6.  
  7.         newStack.push("Tas");
  8.         newStack.push("Sepatu");
  9.         newStack.push("Baju");
  10.         newStack.push("Celana");
  11.  
  12.         System.out.println("Jumlah data pada UserStack: " + newStack.count());
  13.         System.out.println("Data teratas pada userStact: " + newStack.peek());
  14.  
  15.         System.out.println("==================================");
  16.         System.out.println("User yg dikeluarkan (Pop): " + newStack.pop());
  17.         System.out.println("Jumlah data setalah Pop: " + newStack.count());
  18.         System.out.println("Data teratas setelah Pop: " + newStack.peek());
  19.     }
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment