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 OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP 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: 40436
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.
subject: Use of shift operators in Java