Guest User

Untitled

a guest
May 24th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1.  
  2. /**
  3.  * Write a description of class Ejercicio1 here.
  4.  *
  5.  * @author (your name)
  6.  * @version (a version number or a date)
  7.  */
  8. import java.util.ArrayList;
  9. public class Ejercicio1
  10. {
  11.     public ArrayList<String> componerLista(String[] nombre, int[] cantidad){
  12.         ArrayList<String> lista=new ArrayList<String>();
  13.         for(int i=0;i<=nombre.length; i++){
  14.             lista.add(nombre[i]+" "+cantidad[i]);
  15.         }
  16.         return lista;
  17.        
  18.     }
  19. }
Add Comment
Please, Sign In to add comment