In this section, you will learn how to use unsigned right shift ">>>"operator in Java. The Java programming language has operators that perform bitwise operations. In the example below we have shown the usage of unsigned right shift ">>>"operator.
Description of code:
The unsigned right shift ">>>"operator shifts a zero into the leftmost position however the leftmost position after ">>" depends on sign extension. In the program code given below, this operator has shifted the bits to the leftmost position that is why we have got 19 as an output.
Here is the code of program:
|
Output of the program:
| C:\unique>javac Unrtshift.java C:\unique>java Unrtshift 19 C:\unique> |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? >>"-Operator.html">Discuss: Unsigned right shift ">>>" Operator View All Comments
Post your Comment