Note that although the Java Language Specification requires the reuse of Integer objects in the range -128 to 127 as Sridhar explained, there is nothing to stop a JVM implementation from implementing the reuse of values outside this range as well. So , although in this case num3==num4 returned false, it is possible that in other JVMs it could return true i.e. you shouldn't write code that relies on num3==num4 returning false, where num3 and num4 are outside the range -128 to 127.
Stinging nettles are edible. But I really want to see you try to eat this tiny ad:
how do I do my own kindle-like thing - without amazon