Java Operators

Last Updated: March 18, 2022

An operator is a symbol that tells the compiler to perform a specific mathematical or logical manipulation.

Java has four general classes of operators: arithmetic, bitwise, relational, and logical.

Arithmetic Operators

Java programming language has the following arithmetic operators:

Operator Meaning
+ Addition(also unary plus)
Subtraction(also unary mins)
* Multiplication
/ Division
% Modulus
++ Increment
Decrement

Increment and Decrement


x = x +1;
// is the same as
x++;

x = x -1;
// is the same as 
x--;




Relational and Logical Operators

Test