public class abc
public static void main(String  args)
and if we shift it 31 times it is zero. how can it be?
i am very much confused ...can anyone pls explain it in detail....
thanx in advance ..
If the promoted type of the left-hand operand is int, only the five lowest-order bits of the right-hand operand are used as the shift distance. It is as if the right-hand operand were subjected to a bitwise logical AND operator & (�15.22.1) with the mask value 0x1f. The shift distance actually used is therefore always in the range 0 to 31, inclusive.
So a shift by 32 bits is interpreted as a shift by 0 bits.