Expression statements

An expression-statement evaluates a given expression. The value computed by the expression, if any, is discarded. expression-statement : statement-expression;statement-expression : invocation-expressionobject-creation-expressionassignmentpost-increment-expressionpost-decrement-expressionpre-increment-expressionpre-decrement-expression
Not all expressions are permitted as statements.

[Note: In particular, expressions such as x + y and x == 1, that merely compute a value (which will be discarded), are not permitted as statements. end note]

Execution of an expression statement evaluates the contained expression and then transfers control to the end point of the expression statement. The end point of an expression-statement is reachable if that expression-statement is reachable.