Java Operators

Java Operators


Java Operators

Operators in Java are the special type of tokens in Java which when coupled with entities such as variables or constants or datatypes result in a specific operation such as addition, multiplication or even shifting of bits.

Java Operators are mainly of the following types:

  • Arithmetic Operators
  • Logical Operators
  • Unary Operators
  • Assignment Operators
  • Ternary Operators
  • Relational Operators
  • Bitwise Operators
  • Shift Operators
  • instanceOf operator

1. Arithmetic Operators in Java

Java Arithmetic Operators are used to perform arithmetic operations. There are mainly 5 Arithmetic Operators in Java.

a. Addition(+)
b. Multiplication(*)
c. Subtraction(-)
d. Division(/)
e. Modulo(%)