Return | Method | Summary |
---|---|---|
static int | reverse(int i) | Reversing the bits. |
static int | reverseBytes(int i) | Reversing the bytes. |
static int | rotateLeft(int i, int distance) | Rotating the bits by distance. |
static int | rotateRight(int i, int distance) | Rotating the bits by distance. |
public class Main {
public static void main(String[] args) {
System.out.println(Integer.reverse(10));
}
}
The output:
1342177280
public class Main {
public static void main(String[] args) {
System.out.println(Integer.rotateLeft(10,2));
}
}
The output:
40
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |