Operators in JAVA
Java is a popular programming language, created in
1995.
Applications of JAVA:
* Mobile applications (specially Android apps)
* Desktop applications
* Web applications
* Web servers and application servers
* Games
* Database connection
* And much, much more!
Operator
An operator is a symbol that operates on one or more
arguments to produce a result.
Java provides a rich set of operators to manipulate
variables.
OPERANDS
Operand 1
Operator
Operand 2
Types of Operators
1.Unary
Operator
2.Arithmetic
Operator
3.Shift
Operator
4.Relational
Operator
5.Bitwise
Operator
6.Logical
operator
7.Ternary
Operator
8.Assignment
Operator
 Increment Operator is Used
to Increment Value Stored inside Variable
on which it is operating.
 Decrement Operator is used
to decrement value of Variable by 1
a = a + 1; a + + ; or + + a ;
a = a - 1; a - - ; or - - a ;
Common Shorthand
The arithmetic operators are used to
construct mathematical
expressions as in algebra.
Their operands are of numeric type.
A shift operator performs bit
manipulation on data by shifting the
bits of its first operand right or left.
Left Shift Right Shift
<< >> >>>
Example of Left Shift
A relational operator compares two values and
determines the relationship between them.
For example: ! = returns true if its two operands are
unequal.
Relational operators are used to test whether two
values are equal, whether one value is greater
than another.
Relational Operators
> < >= <= == !=
Primitives
• Greater Than : >
• Less Than : <
• Greater Than or Equal : >=
• Less Than or Equal : <=
Primitives or Object References
• Equal (Equivalent) :==
• Not Equal : !=
The Result is Always true or false
The bitwise operators are similar to the logical
operators, except that they work on a smaller
scale -- binary representations of data.
These logical operators work only on boolean
operands. Their return values are always boolean.
The Result is Always true or false
Java has a short hand way by using ?: the ternary
Operator
Unlike the if statement, the conditional operator
Is an expression which can be used for
boolean_expression ? expression_1 : expression_2
Any expression
If true Statement If false Statement
These Operators are used to assign a
values into a variable.
The assignment statements has the following syntax:
<variable> = <expression>
Eg: a = 10;
Thanks! for being here

Operators in java By cheena