Errors detected by the compiler are called syntax errors or compile errors.
Syntax errors happened in code construction, such as
What is the output of the following code?
public class Main { public static main(String[] args) { System.out.println("Welcome to Java"); } }
Compile time error
The keyword void
is missing before main.