Why not run the code in your JDK to find out? You will need to fix a couple of compile errors of course, but that's good practice, right?
There doesn't seem to be any guarantee in JLS3 5.1.7 of the behavior in the case of long. However the current JDK seems to behave the same way for long that it does for int. Since this isn't guaranteed, I recommend not relying on this behavior. And it's not going to be on the
test. (In contrast to the behavior for int within the range [-128, 127] which is guaranteed and therefore may be on the test.)
[ February 07, 2005: Message edited by: Jim Yingst ]