package ch10.collection;
import java.util.Stack;
public class Ex05
public static void main(String[] args) {
Stack<Integer> stack=new Stack<Integer>();
stack.push(10);
stack.push(20);
stack.push(30);
while(!stack.isEmpty()) {
System.out.println(stack.size());
System.out.println(stack.pop());
}
}
}
3
30
2
20
1
10