I need help. I have the following information in a text file .txt
Isabel Garcia,10,10,10,10,10,10,10
Luis Fernando,10,09,09,09,09,09,09
Isabel Flores,10,09,09,09,09,09,09
What would be the code to read the txt that is saved in a certain route and convert it to a two-dimensional array in JAVA?
So far I only have this code with WHILE but it does not save it in an array, it just reads it and shows it:
File calificaciones;
FileReader leerArchivo;
leerArchivo = new FileReader("c:/calificaciones.txt");
BufferedReader textoArchivo = new BufferedReader(leerArchivo);
while (cadena!=null) {
cadena= textoArchivo.readLine();
if (cadena!=null) {
System.out.println(cadena);
}
}
textoArchivo.close();
leerArchivo.close();
I need the code to save the name in one position, for example [0] [0], the first qualification in [0] [1] and so on. Separate the data by ",".
Can anyone help me?