Return | Method | Summary |
---|---|---|
static long | reverse(long i) | Reversing the order of the bits. |
static long | reverseBytes(long i) | Reversing the order of the bytes. |
static long | rotateLeft(long i, int distance) | Rotating the binary long value left by distance. |
static long | rotateRight(long i, int distance) | Rotating the binary long value right by distance. |
public class Main {
public static void main(String[] args) {
System.out.println(Long.reverse(123123));
}
}
The output:
-3528711045533138944
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. |