1
I’m doing a job where I need to save the information from a current account, I need to read the information from a file (text) and split this information into account code, name and balance. Also, I need to save this information to an Array.
My problem is this: I cannot split this information to save to an Array. Could you help me?
I created a reader function();
public void leitor() throws FileNotFoundException, IOException{
try (
BufferedReader reader = new BufferedReader (new FileReader ("arquivo.txt"));
) {
for (String line = reader.readLine(); line != null; line = reader.readLine()) {
**String saida = line.split(";");**
System.out.println(saida);
}
}
}
Which just reads the file information, however, I can’t crack that information.
would like to add an Addendum on Arraylist: here. I believe it can help in understanding your question. Because of the array and arraylist tags
– pss1suporte