expressions store the result to a variable after performing operation.
In other words, they assign the value (after the action) to a variable by using '=
int x = 5; // Assignment Expression : x = 5
x = x + 10; // Assignment Expression : x = 15
In the above example, we are assigning value to 'x
Also adding another value (10
) and storing it back to 'x
Asked In: Spotted While Learning |