How to reverse the bits in a short integer in Java
Logic remains same.... (there's some typo in the above post, I guess)...Code:int x = i & 0x00FF; int y = i & 0xFF00; x = x << 8; y = y >> 8; System.out.println(""); System.out.println(x | y);
-dibyaranjan





Reply With Quote