Java View all facts Glossary Help |
syntactic unit > expression |
expression comparison table |
Subject | have syntax | have example | has definition | have purpose | produce | have | have type | is a subtopic of | is a synonym of |
---|---|---|---|---|---|---|---|---|---|
array access expression | myArray[1] |
| that is the type of its result | Arrays | |||||
assignment expression | (x = 1) * 2 (with no ;) | An expression that contains an assignment operator | to assign to a variable | that is the type of its result | Statements and Expressions | ||||
boolean expression | x < y & z > 1 | An expression that produces a true or false result |
| boolean | Statements and Expressions | ||||
cast expression | (int)5.2 | to convert an expression of one type into another type | that is the type of its result | Objects | |||||
compound expression | x * y * z | An expression made up of two or more expressions |
| evaluation order based on the precedence of its operand s | that is the type of its result | Statements and Expressions | |||
conditional operator expression | (boolean expression) ? if-true expression : if-false expression | //Print the value of change and "minute" or minutes" depending if change equals 1 or not |
| a value which is the value of the selected expression | that is the type of its result | Statements and Expressions | |||
numeric expression | x + y |
| that is the type of its result | Statements and Expressions | arithmetic expression | ||||
object creation expression | An expression that creates a new object | to create a new object | that is the type of its result | Objects |
Next syntactic unit: keyword Up: syntactic unit Previous syntactic unit: definition