How to reverse the bits in a short integer in Java

Code:
                int x = i & 0x00FF;
		int y = i & 0xFF00;
		
		x = x << 8;
		y = y >> 8;
		
		System.out.println("");
		System.out.println(x | y);
Logic remains same.... (there's some typo in the above post, I guess)...

-dibyaranjan