Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Stack;
- public class Other
- {
- public static void main(String [] args) {
- Stack<String> s = new Stack();
- s.push("one");
- s.push("two");
- s.push("three");
- s.push("four");
- while(!s.isEmpty()) {
- System.out.println(s.pop());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement