Given the proper imports and given:
81. String in = "1234,77777,689"; 82. Scanner sc = new Scanner(in); 83. sc.useDelimiter(","); 84. while(sc.hasNext()) 85. System.out.print(sc.nextInt() + " "); 86. while(sc.hasNext()) 87. System.out.print(sc.nextShort() + " ");
What is the result?
A is correct.
The first while loop "consumes" the Scanner object, so the second while loop has nothing to process.
If the first while loop didn't exist, the second while loop would throw an out of range exception because shorts cannot be larger than 32767.