Advertisement
CotaIgnorada

ArrayList

Apr 13th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. package arreglo;
  2.  
  3.  
  4. import java.util.ArrayList;
  5.  
  6. public class Arreglo {
  7. ArrayList Arreglo = new ArrayList();
  8. int i;
  9. public void llenar(){
  10.  
  11. for(i=0; i< 15; i++){
  12. Arreglo.add((int)(Math.random()*(100-0)));
  13. }
  14. }
  15. public void mostrar(){
  16. for(i=0; i<15; i++){
  17. System.out.println(Arreglo.get(i));
  18. }
  19. }
  20. public void comprobar(){
  21. System.out.println("Comprobando"+Arreglo.size());
  22.  
  23. }
  24. public void eliminar(){
  25. if(Arreglo.size())
  26. }
  27.  
  28.  
  29.  
  30.  
  31. public static void main(String[] args) {
  32.  
  33. Arreglo c = new Arreglo();
  34. c.llenar();
  35. c.mostrar();
  36. c.comprobar();
  37. c.eliminar();
  38.  
  39. }
  40.  
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement