Saturday 7 July 2018

PROGRAMMING LANGUAGE JAVA BASIC OPERATORS

JAVA BASIC OPERATORS
Java provides a rich set of operators to manipulate variables. We can divide all the Java operators into the following categories.

  1.   Arithmetic operators.
  2.   Relational operators
  3.   Bitwise operators.
  4.   Logical operators.
  5.   Assignment operators.
  6.   Misc operators.
http://technolgydrift.blogspot.com/2018/07/programming-language-java-about-java.html
( WAnt to know About Basic of JAVA click on this link ).

http://technolgydrift.blogspot.com/2018/07/difference-betwen-java-snd-javascript.html
( Want to know about difference between java and javascript  click on this link ).


1. The Arithmetic Operators.

Arithmetic operators are used in mathematical expressions in the same way that they are used in algebra.

Assume integer variable A holds 10 and variable B holds 20 , then..

2. Relational Operators.

There are following relational operators supported by java language.

Assume variable A holds 10, and variable B holds 20, then..


3. Bitwise Operators.

Java defines several bitwise operators, which can be applied to the integer types, long,  int, short, char, and byte..
Bitwise operators works on bit and performs bit by bit operation. Assume if A = 60 and B = 13, now in binary format they will be as follows .

 A = 0011 1100
B = 0000 1101

A&B = 0000 1100

A|B = 0011 1101

A^B = 0011 0001

!A = 1100 0011

Assume integer variable A holds 60 and variable B holds 13, then

4. Logical Operator.

Assume Boolean variables A holds true and variable B holds false, then

5. Assignment Operator.

Following are the assignment operators supported by java language.

1.   ( = )   Assigns value from right side operand  to left side operand.
                C = A+B  will assigns value of A+B into C.

2. ( += )  ADD AND assignment operator. Its ADD right operand to the left operand and assign  the                    result to left operand.
               C+=A equal to C = C+A .

3. ( -= ) Subtract AND assignment operator. Its subtract right operand from the left operand and                       assign result to the left operand.
            C-=A equal to C=C-A

4.  ( *= ) Multiply AND assignment operator. It multiplies right operand with the left and assign the                   result with the left operand.
               C*=A equal to C=C*A

5. ( /= )  Divide AND assignment operator. It divides right operand with the left and assign the                          result with the left operand.
               C/=A equal to C=C/A

6.  ( %= )  Modulos AND assignment operator. It divides right operand with the left and assign the                       result with the left operand.
                 C%=A equal to C=C%A
7. ( <<= ) Left Shift AND assignment operator
                C<<=2 is same as C = C<<2

8. ( >>= ) Right Shift AND assignment operator
                C>>=2 is same as C = C>>2


Misc Operator.

Conditional operator
Conditional operator is also known as ternary operator. This operator consists of three operand and is used to evaluate boolean expressions. The goal of the operator  is to decide,  which value should be assigned to the variable..



https://chat.whatsapp.com/LQwOhM1jvx25uNG5LXxU2f
If you are interested in this and want to learn more about Internet Networking Programming language and Technologies then join my whatsapp group by this link.

we buy cars for cash cash for car cash for cars cash cars we buy junk cars buy junk cars sell my junk car near me sell my car for cash sell car for cash sell my car for cash today cash 4 cars we buy cars for cash Car Removals Sydney https://unwantedcarremovalsydney.com.au Cash for Scrap Cars Service Unwanted Car removals Car Removal Sydney Car Removal Car Removals Car Removals Sydney Car Removals Sydney

1 comment:

( DIGITAL INDIA ) DIGITAL NETWORKING SERVICE

DATA COMMUNICATION AND NETWORKING With the advancement of Data Communication facilities the communication between computers has increa...