Так вот что я до сих пор:
public String[] findStudentInfo(String studentNumber) {
Student student = new Student();
Scanner scanner = new Scanner("Student.txt");
// Find the line that contains student Id
// If not found keep on going through the file
// If it finds it stop
// Call parseStudentInfoFromLine get the number of courses
// Create an array (lines) of size of the number of courses plus one
// assign the line that the student Id was found to the first index value of the array
//assign each next line to the following index of the array up to the amount of classes - 1
// return string array
}
Я знаю, как найти, содержит ли файл строку, которую я пытаюсь найти, но я не знаю, как получить всю строку, в которой она находится.
Это мой первый пост, поэтому, если я сделал что-то неправильно, сообщите мне.