aspose file tools*
The moose likes Java in General and the fly likes What does Integer.rotateLeft(i, 64); actually do?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "What does Integer.rotateLeft(i, 64); actually do??" Watch "What does Integer.rotateLeft(i, 64); actually do??" New topic
Author

What does Integer.rotateLeft(i, 64); actually do??

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1056

What does Integer.rotateLeft(i, 64); actually do??

I mean if it shifts bits how can we calculate that(assuming ourselves as Compilers)


http://www.lifesbizzare.blogspot.com || OCJP:81%
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Vishal Hegde wrote:What does Integer.rotateLeft(i, 64); actually do??

Try it and see.

I mean if it shifts bits how can we calculate that(assuming ourselves as Compilers)


What do you mean?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14433
    
  23

Lookup the rotateLeft() method in the API documentation of class Integer. Especially note this part:
Note also that rotation by any multiple of 32 is a no-op ...


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Chandraprakash Sarathe
Greenhorn

Joined: Jan 21, 2012
Posts: 16


here rotateLeft shifts the bit 2 position left.



Chandraprakash Sarathe
http://javaved.blogspot.com
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What does Integer.rotateLeft(i, 64); actually do??