volume_mute
What is the error message that the compiler will show if a semi-colon is missing?
publish date: 2021/07/09 22:56:00 GMT+10
volume_muteSystem.out.println("Line has " + num + " chars.")
Correct Answer
Explanation
If you mistype part of a program, the compiler may issue a syntax error. The message usually displays the type of the error, the line number where the error was detected, the code on that line, and the position of the error within the code. Here's an error caused by omitting a semicolon (;
) at the end of a statement:
Reference
https://www.cis.upenn.edu/~bcpierce/courses/629/papers/Java-tutorial/getStarted/problems/index.html