Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main
- {
- public static void main(String[] args)
- {
- Pilha p = new Pilha(10);
- char c;
- p.empilhar('a');
- p.empilhar ('b');
- p.empilhar ('c');
- p.empilhar ('d');
- p.empilhar ('e');
- p.empilhar ('f');
- p.empilhar ('g');
- p.desempilhar();
- p.empilhar ('i');
- p.empilhar ('j');
- p.empilhar ('k');
- while(!p.vazia())
- {
- c = p.desempilhar();
- System.out.println(c);
- }
- p.destruir();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement