The program below has a syntax error.
class ExamPrep {
public static void main(String[] args) {
System.out.println("Hello Java")
}
} It is missing a semicolon on line 3.
What will happen when you compile and run this? Choose the correct answer:
A. When you execute javac , the command will fail and an error will be printed showing that ';' is expected on line 3.
B. javac will complete without an error, but when you execute java ExamPrep, the command will fail and an error will be printed showing that ';' is expected on line 3.
C. javac will complete without an error, but when you execute java ExamPrep, a runtime exception exception will occur showing that ';' is expected on line 3.
D. javac will complete without an error, and java ExamPrep will print Hello Java.