They ask me for a method where I have to load a txt file and add it to two arrays, one text and one double. I have the following code and I want to know how to add it to the methods, I already have an idea but I do not know if it's okay.
Note the two cellular arrangements and rimes have already been declared.
** The code I have not tried because I need 5 more methods
public RegistroLlamadas() {
String linea;
String[] partes;
try {
fr = new FileReader("Archivos\Registro.txt");
br = new BufferedReader(fr);
while ((linea = br.readLine()) != null) {
partes = linea.split("@");
}
ncelular[0] = linea;
rminutos[0] = Double.parseDouble(linea);
fr.close();
} catch (Exception e) {
}
}