Skip to main content

Operators in Java

Learn Operators in Java (Java Basics, Java) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

1. Introduction An operator is a symbol that performs an action on one, two or three operands and produces a value whose type is worked out at compile time . Java has arithmetic, relational, logical, assignment, unary, ternary, bitwise and shift operators, and expressions follow precedence and associativity. Operands are evaluated left to right, binary numeric promotion applies (byte plus short gives int) and compound assignment carries an implicit cast.

More lessons in Java Basics