Use arithmetic operators for basic math operations:
+ : addition- : subtraction* : multiplication/ : division% : modulus (remainder)These operators assign values or update existing ones:
=, +=, -=, *=, /=, %=Compare two values and return true or false:
==, !=, >, <, >=, <=Used for combining or inverting boolean expressions:
&& – AND|| – OR! – NOTUsed to increase or decrease a value by one:
int x = 5;
x++; //equivalent to x = x + 1
System.out.println(x); // 6Java follows the standard math order of operations. Use parentheses to ensure correct order.
What will this print?
A. trueB. falseC. ErrorAsk the AI if you need help understanding or want to dive deeper in any topic