My Java Quiz

The ultimate place to learn Java!

Question #51: What is the output of the following code?

Scanner input = new Scanner("5 10 5");
int result = 0;
while(input.hasNext()){
  result += Integer.parseInt(input.next());
}System.out.println(result);