What is the difference between the >> and >>> operators?

hi,

What is the difference between the >> and >>> operators?

Thanks,

View Answers

April 18, 2013 at 4:07 PM

Hi friend,

'>>' operator is known as signed right shift operator and it shifts the left operand bit to right with the sign extension.

'>>>' operator is known as unsigned right shift operator always shifts zeros into the leftmost position by the distance specified in the right operand.

For more detail please go through the following links may, these links will be helpful for you.

http://www.roseindia.net/java/master-java/bitwise-bitshift-operators.shtml

http://www.roseindia.net/java/master-java/java-unsigned-right-shift.shtml

http://www.roseindia.net/java/master-java/java-right-shift.shtml

http://www.roseindia.net/java/jdk7/BitwiseOperator.shtml









Related Tutorials/Questions & Answers:
Advertisements