Last active
August 19, 2023 23:15
-
-
Save hdelei/0bbff7d8d37c718d8ab6023f568a5161 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
class HelloWorld { | |
public static void main(String[] args) { | |
ArrayList<String[]> linhas = new ArrayList<>(); | |
//aqui fica dentro do WHILE ======= | |
String textoLinha = "vanderlei;alice;isa"; | |
String[] linhaQuebrada = textoLinha.split(";"); | |
linhas.add(linhaQuebrada); | |
//============== | |
//aqui eh soh pra imprimir e ver o resultado | |
System.out.println("coluna 1: " + linhaQuebrada[0]); | |
System.out.println("coluna 2: " + linhaQuebrada[1]); | |
System.out.println("coluna 3: " + linhaQuebrada[2]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment