Operators are used to use and manipulate variables.

Arithmetic operators are used in mathematical expressions in the same way you would use them in Algebra. Say you have two integers: A has a value of 10, B has a value of 20.**Section A: Arithmetic****+ (Addition):**A + B would give you 30.

**- (Subtraction):**B - A would give you 10.

*** (Multiplication):**A * B would give you 200.

**/ (Division):**B / A would give you 2.

**% (Modulus):**Modulus divides and returns the remainder. B % A would give you 0.

**++ (Increment):**Increase the value by 1. B++ would make B 21.

**-- (Decrement):**Decrease the value by 1. B-- would make B 19.

**Section B: Relational**

**== (Equal to):**Checks if two values are equal. A == B is false.

**!= (Not equal to):**Checks if two values are unequal. A != B is true.

**> (Greater than):**Checks if the left value is greater than the right value. A > B is false.

**< (Less than):**Checks if the left value is less than the right value. A < B is true.

**>= | <= (Greater/Less than or equal to):**Like >/< but will also be true if the values are equal. A >= B is false. A <= B is true.

**Section C: Logical**

**&& (And):**Returns true only if both/all expressions are true. A <= B && A >= B is false. A <= B && A == 10 is true.

**|| (Or):**Returns true if any of the expressions are true, else returns false. A <= B || A > 50 is true. A > B || B == 20 is true. A > B || B == 5 is false.

**! (Not):**Reverses the expression it is applied to. !(A > B) is true. !(A < B) is false.

**Section D: Assignment**

*assign*value to variables.

**=:**The most basic assignment operator. Just sets a value. C = A + B would set C to 30.

**+=:**Adds the right value to the left value and then sets the left value to the result. B += A would set B to 30.

**-=:**Subtracts the right value from the left value and then sets the left value to the result. B -= A would set B to 10.

***=:**Multiplies the left value by the right value and sets the left value to the result. B *= A would set B to 200.

**/=:**Divides the left value by the right value and sets the left value to the result. B /= A would set B to 2.

**Section E: Misc**

**(? : ) Conditional Operator:**A conditional operator, also known as the ternary operator, is used to evaluate a boolean value and decide what value should be there based on the boolean.

For example:

Code (Java):

**instanceof Operator:**The instanceof operator is used to check if an object is of a particular type. isString("potato") would return true. isString(new Integer(5)) would return false.

Continue the guide in Part 3!