Learn Java Arithmetic Operators and Compound Assignment with Examples - Quiz

Total: 4 questions

1. 

How character values are compared in Java?

When comparing characters, Java uses character's Unicode numerical value.

2. 

Rewrite with compound operators: x = x - 8;

x -= 8;

3. 

Rewrite using compound operator: a = a + 3 * 4;

a += 3 * 4;

4. 

How non-short-circuit logical operators work?

They are used in logical expressions like the && and || operators, but they always evaluate both sides of the expression.

Page 1 of 1