Java Language -- Expressions
Java's expressions are very similar to C and include the following forms. Both expressions and statements have values.
- arithmetic:
- autoincriment and autodecriment
- i++ /* equivalent to i = i +1 */
- boolean
- ((i > 0 ) && (jɬ)) ||(state = -1)
- bit operations
- i <ə /* Left shift by 1 binary digit */
- conditional expression
- (iɬ) ? expression1 : expression2
- strings have operators such as catenation
- "fred" + "jim" is "fredjim"
- object property operators
- (a instanceof B) /* True iff object a is of class B */