-1
public List<String> Matriz(){
String CaminhoArquivo=("C:\\Users\\jessica borges"
+ "\\Downloads\\CalculadoraMatrizes-20190315T112959Z-001"
+ "\\CalculadoraMatrizes-20190315T112959Z-001"
+ "\\CalculadoraMatrizes\\src\\ArquivosMatriz\\matrix.txt");
List<String> conteudo = new ArrayList<>();
try {
BufferedReader in = new BufferedReader(new FileReader(CaminhoArquivo));
String linha;
while ((linha = in.readLine()) != null) {
conteudo.addAll(Arrays.asList(linha.split(" ")));
}
in.close();
} catch (IOException ioe) {
System.out.println(ioe);
}
System.out.println(conteudo);
return conteudo;
}
This above method adds what I want in the array, I want to treat its return in another method that follows below:
public void Matriz22(){
}
I’ve tried many ways but I can’t.