Operators

We assume you are pretty much familiar with operators (+ , , * , / , =) used in mathematical operations. Java (or be it any other programming language) also provides us with such operators to carry out various logical operations.

Operators play very important role in building logic. Operators are used to manipulate variables.

There are many types of operators in java –

#JavaOperator #JavaCodeEasy#JavaBasic #Operators

  • Arithmetic Operator

#JavaOperator #CodeEasySiteJava

 

  • Relational operators

     Let A = 6 & B = 3.

#JavaRelationalOperator

 

  • Bitwise Operator

We assume you know about the truth table. If not please learn truth table for                OR, AND  & NOT. Bitwise operator works on bits and performs bit-by-bit                        operation.

    Let A = 10 & B =12.

In binary form value of  A = 0000 1010 &

B = 0000 1100

#BitwiseOperator #JavaOperator

 

  • Logical Operator

Assume there are two Boolean variables A & B.

boolean A = true;

boolean B = false;

#JavaOperator #LogicalOperator

 

 

  •  Assignment operator

#AssignmentOperator #JavaOperator #CodeEasyJavaOperator

 

  • Misc Operators

#ternaryOperator #instanceoperator #Conditionaloperator

These operators will help you understand looping conditions which you will learn in next tutorials.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s