• Post Reply Bookmark Topic Watch Topic
  • New Topic

Use of shift operators in Java

 
Debopam Poddar
Ranch Hand
Posts: 51
Eclipse IDE Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please expalin me the practical use of Java shift operators (>> , <<). When to use these operators and why?
 
Campbell Ritchie
Marshal
Posts: 53161
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this old thread. If you need more information, ask again
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!