the actual operation carried out on the right hand operand is a bitwise & using a mask of 0x1F for ints and 0x3F for longs. For positive values this is the same as a %32 or %64, but for negative values it behaves differently. What it amounts to, at least in the few tests I've done, is that if the operand is greater than -32(for ints) it adds the operand to 32. So a shift of -4 would actually be a shift of 28. If the operand is less than -32 it will do a %32 on the operand then add the result (a negative number) to 32.
For a line like this:
54 >>> -34;
take -34%32, the result is -2, add -2 to 32, the result is 30, so the line could be written as:
54 >>> 30;
As a follow up, I dont think you'll see anything like this on the
test - I didn't and dont know of anyone else who did.
hope this helped
------------------
Dave
Sun Certified Programmer for the Java� 2 Platform