Java Topic Practice
Text Files and Scanner
Text Files and Scanner MCQ Practice
Question 1 of 15
Answered 0 of 15
Choose one answer.
What is printed by the following code segment?
Scanner s = new Scanner("12 7 3");
int t = 0;
while (s.hasNext())
{
t += s.nextInt();
}
System.out.print(t);