Question:

All Java statements must end with a/an ................ .

Show Hint

In Java, don't forget the semicolon (`;`) — it's mandatory at the end of every statement.
Updated On: Jul 14, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

In Java programming, every statement must end with a semicolon (`;`).
This semicolon acts as a delimiter, helping the compiler understand where one instruction ends and the next begins.
Without a semicolon, the program will throw a compilation error because it cannot correctly parse the statements.
This rule applies to variable declarations, assignments, method calls, and control flow commands.
While block structures like classes and methods use curly braces (`{}`), inner statements still follow the semicolon rule.
Using semicolons consistently ensures clarity, structure, and correct program execution.
Was this answer helpful?
0
0

Questions Asked in CBSE CLASS XII exam

View More Questions