Scanner Methods Quiz
star
star
star
star
star
Last updated almost 2 years ago
5 questions
1
What is output by the code below?Scanner s = new Scanner("1 2 3 4 5 6");int x = 0;x += s.nextInt();x += s.nextInt();System.out.println( x );
What is output by the code below?
Scanner s = new Scanner("1 2 3 4 5 6");
int x = 0;
x += s.nextInt();
x += s.nextInt();
System.out.println( x );
1
1
1
1