Sorry I have a question, I have to do a class that reads a .txt grades and print the name of the student with the highest average, the problem is that only read line by line and do not know how to read character by character can make you read a score of 2-3 digits and save them in a variable just like the name
The document should be like this
Alarcón 75 80 90 50 75 100
Galicia 50 75 50
Valencia 80 95 50 100
then read the grades and take the average and print on the screen the name of the student with the highest rating
The only thing I have is this class that I did but it is to read line by line
public static String[] cargarArreglo (InputStream is, int n) throws IOException{
int i=0;
int j = 0;
String [] v = new String [n];
InputStreamReader isr = new InputStreamReader (is);
BufferedReader br = new BufferedReader (isr);
String linea = br.readLine();
while ((linea != null) && (i <n)) {
v[i] = linea;
linea=br.readLine();
i++;
}
br.close();
for(j =0;j<n;j++){
System.out.println(v[j]);
}
return v;
}