This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi Jeff, Welcome to JavaRanch! Please have a look at our naming policy -- I think "Jeff Jeff" falls under "obviously fictitious." Thanks. We try to keep things respectable 'round these parts. Anyway, as to your question: from the Java Language Specification:
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, since -2 & 0x1f is 0x1e, or 30, >> -2 is equal to right-shifting by 30 bits; enough to annihilate all the nonzero bits of decimal 100!