Analyze the following code:

public class Test { public static void main (String args[]) { int i = 0; for (i = 0; i < 10; i++); System.out.println(i + 4); }}

a. The program has a compile error because of the semicolon (;) on the for loop line.
b. The program compiles despite the semicolon (;) on the for loop line, and displays 4.
c. The program compiles despite the semicolon (;) on the for loop line, and displays 14.
d. The program has a runtime error because of the semicolon (;) on the for loop line.

Respuesta :

ijeggs

Answer:

A

Explanation:

This program has a compile error, it will not compile because of the semicolon (;) on the for loop line. Compile time errors are problems that violates a language's syntax or a missing reference to a file and will prevent successful compilation of code. With the use of Integrated development environments (IDEs), the lines where these errors occur will usually be shown.

ACCESS MORE