【单选题】Analyze the following code: import javA.util.Scanner; public class Test { public static void main(String[] args) { int sum = 0; for (int i = 0; i < 100000; i++) { Scanner input=new Scanner(System.in...
A.
The program compiles and runs, but it is not efficient and unnecessary to execute the Scanner input = new Scanner(System.in); statement inside the loop. You should move the statement before the loop.
B.
The program compiles, but does not run because there is not prompting message for entering the input.
C.
The program does not compile because the Scanner input = new Scanner(System.in); statement is inside the loop.
D.
The program compiles, but does not run because the Scanner input = new Scanner(System.in); statement is inside the loop.