Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int someValue;
- someValue = +1; // Unary Operator that signifies positive numbers.
- someValue = -1; // Unary Operator that signifies negative numbers, can also be used to flip the sign of a value.
- someValue++; // Unary Operator that increments by one after evaluation.
- ++someValue; // Unary Operator that increments by one before evaluation.
- someValue--; // Unary Operator that decrements by one after evaluation.
- --someValue; // Unary Operator that decrements by one before evaluation.
- someValue = 1 + 1; // Binary Operator that does addition.
- someValue = 1 - 1; // Binary Operator that does subtraction.
- someValue = 1 * 1; // Binary Operator that does multiplication.
- someValue = 1 / 1; // Binary Operator that does division.
- someValue = 1 % 1; // Binary Operator that does remainder.
- someValue += 1; // Compound Operator that does addition. Same as: someValue = someValue + 1;
- someValue -= 1; // Compound Operator that does subtraction. Same as: someValue = someValue - 1;
- someValue *= 1; // Compound Operator that does multiplication. Same as: someValue = someValue * 1;
- someValue /= 1; // Compound Operator that does division. Same as: someValue = someValue / 1;
- someValue %= 1; // Compound Operator that does remainder. Same as: someValue = someValue % 1;
Advertisement
Add Comment
Please, Sign In to add comment