Question 151
Multiple choice
Using Text Files
Using the
Student class and the same file as the previous question. What is printed?
// (list built as in previous question: Alice 80, Bob 90, Carol 70)
int sum = 0;
for (int i = 0; i < list.size(); i++) {
sum = sum + list.get(i).getGrade();
}
System.out.println(sum / list.size());
Pick an answer, then check it. The solution opens in a window.
DCorrect answer
Answer images

