This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Shift Operarot Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Shift Operarot" Watch "Shift Operarot" New topic
Author

Shift Operarot

Sujittt Tripathyrr
Ranch Hand

Joined: Jun 21, 2006
Posts: 96
What is use of <<< operator in java.
I want some examples.

Thanks
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
<<< is not an operator in Java.

Do you mean >>>?
Sujittt Tripathyrr
Ranch Hand

Joined: Jun 21, 2006
Posts: 96
yes
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
>>> is the unsigned right shift operator.

This is necessary because the normal right shift operator >> will shift bits in from the left, but will preserve the sign.

The leftmost bit in the bit representation of a number indicates its sign.

>>> will force 0 to be shifted in even if the number is negative.
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
How do the '>>', '>>>', and '<<' operators work?
 
Don't get me started about those stupid light bulbs.
 
subject: Shift Operarot