Remember that in
Java the int data type is a 32-bit signed two's complement integer.
If you convert the hexidecimal value 0xCAFEBABE to its binary equivalent you'll get 11001010111111101011101010111110 (take my
word for it).
The most significant bit here is the sign bit, which is 1, indicating that it should be treated as a negative number.
So when you convert this signed binary represention to its negated decimal equivalent (using binary arithmatic) you'll get a value of -889275714, which is within the range of the int datatype.
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.