. . . expected
The syntax of JAVA is very specific about the required punctuation. This error occurs,
for example, if you forget a semicolon at the end of a statement or don’t balance parentheses:
if (i > j // Error, unbalanced parentheses
max = i // Error, missing semicolon
else
max = j;
Unfortunately, this syntax error is not necessarily caught precisely at the point of the
mistake so you must carefully check the preceding characters in the line or even in a
previous line in order to find the problem.
ECLIPSE:
Syntax error, insert ") Statement" to complete IfStatement.
Syntax error, insert ";" to complete Statement
ECLIPSE is more informative as to the precise syntax error encountered.
No comments:
Post a Comment