Did you see that only the above expressions can be turned into statements after adding semicolons, including: assignment, self-increment and self-decrement (pre- and post-prefix), method invocation, and instance creation. Excludes conditional expressions. It is different from C/C++.
It is also clearly mentioned later:
Unlike C and C++, the Java programming language allows only certain forms of expressions to be used as expression statements.
Official description here:
http://docs.oracle.com/javase/specs/jls/se7/html/jls-14.html#jls-14.8
Did you see that only the above expressions can be turned into statements after adding semicolons, including: assignment, self-increment and self-decrement (pre- and post-prefix), method invocation, and instance creation. Excludes conditional expressions. It is different from C/C++.
It is also clearly mentioned later:
Java expressions are not all statements
This way of writing the first sentence cannot be used as a sentence alone, just like a==b; is incorrect, just change it to if(a==b){}