Advertisement
PRO_gramer

adciona posição

Apr 27th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. package aula.est;
  2. public class TesteAdicionaPorPosicao {
  3. public static void main(String[] args) {
  4. Aluno a1 = new Aluno();
  5. Aluno a2 = new Aluno();
  6. Aluno a3 = new Aluno();
  7. a1.setNome("Rafael");
  8. a2.setNome("Paulo");
  9. a3.setNome("Ana");
  10. Vetor lista = new Vetor();
  11. lista.adiciona(a1);
  12. lista.adiciona(0, a2);
  13. lista.adiciona(1, a3);
  14. System.out.println(lista);
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement