File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Use of shift operators in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Use of shift operators in Java" Watch "Use of shift operators in Java" New topic

Use of shift operators in Java

Debopam Poddar
Ranch Hand

Joined: Jun 21, 2005
Posts: 51

Can you please expalin me the practical use of Java shift operators (>> , <<). When to use these operators and why?
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45286
Try this old thread. If you need more information, ask again
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

shift operators are use in Integer arithmetic calculation to make fast calculation.

Have a look the source code of java.util.Integer . this class uses shift operators much.
I agree. Here's the link:
subject: Use of shift operators in Java
It's not a secret anymore!