Expressions

int cadence = 0;

anArray[0] = 100;

System.out.println("Element 1 at index 0: " + anArray[0]);


int result = 1 + 2; // result is now 3

if (value1 == value2) 
    System.out.println("value1 == value2");
  • Is a construct made up of variables, operators, and method invocations, which are constructed according to the syntax of the language, that evaluates to a single value.
  • The Java programming language allows you to construct compound expressions from various smaller expressions as long as the data type required by one part of the expression matches the data type of the other.
  • If you don't explicitly indicate the order for the operations to be performed, the order is determined by the precedence assigned to the operators in use within the expression.

Expressions — Structure map

Clickable & Draggable!

Expressions — Related pages: