多选题
Given the proper imports, and given:
23. String s = "123 888888 x 345 -45";
24. Scanner sc = new Scanner(s);
25. while(sc.hasNext())
26. if(sc.hasNextShort())
27. System.out.print(sc.nextShort() + " ");
What is the result?
A、
The output is 123 345
B、
The output is 123 345 -45
C、
The output is 123 888888 345 -45
D、
The output is 123 followed by an exception.
E、
The output is 123 followed by an infinite loop.
【正确答案】
E
【答案解析】
提交答案
关闭