Java Compile-Time Syntax Error
Which of the following best describes the compile-time error in the code segment below?
public class Debug {
public static void main(String[] args) {
int num = 5
int sum = num + 10;
System.out.println(sum);
}
}
A
Undeclared variable used in the expression.
B
Incorrect variable type used for num.
C
Improper method invocation in main.
D
Missing semicolon after the declaration of num.
APFIVE