Troubleshooting

Expression Syntax Errors

The compiler reports a ')'expected error in an expression.

Syntax errors often result from mismatched parentheses in an expression. When an expression cannot be compiled, verify that the parentheses are correctly paired. If an expression is so complex that this is difficult to do, consider separating it into multiple statements that assign intermediate results to variables that are then used to compute the desired result. This approach will reduce the likelihood of syntax errors and improve the maintainability of your code.

Unexpected Expression Results

An expression produces a numeric result other than what you expected.

First, review the precedence of Java operators in Table 5.2 to determine ...

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.