>>" Operator" name="description"> >>" Operator" name="keywords">
Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Home Java Master-java Unsigned right shift ">>>" Operator

Related Tutorials


Share on Google+Share on Google+

Unsigned right shift ">>>" Operator

In this section, you will learn how to use unsigned right shift ">>>"operator in Java.

Unsigned right shift ">>>" Operator


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: 

public class Unrtshift{
 public static void main(String args[]){
  System.out.println78  >>> 2)

Output of the program:

C:\unique>javac Unrtshift.java

C:\unique>java Unrtshift


Download this example.


If you enjoyed this post then why not add us on Google+? Add us to your Circles

Liked it!  Share this Tutorial

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 8, 2007

Related Tutorials

>>"-Operator.html">Discuss: Unsigned right shift ">>>" Operator   View All Comments

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
Rahul Gautam
August 20, 2011
Unsigned right shift ">>>" Operator

What is the use of 'Unsigned right shift ">>>" Operator' in picture
ajit kumar
March 4, 2013

I get the same with int i=78>>2; what is the difference between >> and >>> ?