Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- “Inditex;22.72;22.95 Telecinco;10.02;11.02”
- public String [][] partirString (String acc) {
- String [] [] res;
- //Primero partimos por el espacio
- String [] aux = acc.split(" ");
- //Con esto sabemos el número de filas de la matriz
- res = new String[aux.length][];
- //Ahora partiremos por el ;
- for (int ii=0; ii<aux.length;ii++){
- res[ii] = aux[ii].split(";");
- }
- return res;
- }
- 1 public String [][] partirString (String acc) {
- 2 String [] [] res;
- 3
- 4 String [] aux = acc.split(" ");
- 5 //Con esto sabemos el número de filas de la matriz
- 6 res = new String[aux.length][];
- 7 //Ahora partiremos por el ;
- 8 for (int ii=0; ii<aux.length;ii++){
- 9 res[ii] = aux[ii].split(";");
- 10 }
- 11 return res;
- 12 }
- { "Inditex;22.72;22.95", "Telecinco;10.02;11.02" }
- aux= { null, null }
- {
- {"Inditex", "22.72","22.95"},
- {"Telecinco", "10.02","11.02"}
- }
Add Comment
Please, Sign In to add comment