Difference between >> and >>> - Java

Difference between >> and >>>

The >> is right shift operator. It shifts bits towards right.

For example:
5 >> 1 returns 2. It shifts one bit towards right and one bit is lost. The result is ‘10’ which is equivalent to 2. The bit values will be same, 0 for positive number, 1 for negative number.
The >>> is right shift unsigned operator. It shifts bits towards right. Zeros are fill in the left bits regardless of sign.

What is an Anonynous inner class? - Java
Anonymous Inner Classes - An inner class without a name. It allows the declaration of the class, creation of the object and execution of the methods in it at one shot...
What is object deep copy and shallow copy? - Java
In deep copy the copy operations would respect the semantics of the object. For example, copying an object along with the objects to which it refers to...
What is dynamic variable in java and where do we use them?
The variables that are initialized at run time is called as dynamic variable...
Post your comment