Created
November 19, 2009 08:36
-
-
Save tedheich/238641 to your computer and use it in GitHub Desktop.
double equal versus equal method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DoubleEqualTest { | |
public static void main(String []args) { | |
Integer a = new Integer(1024); | |
Integer b = new Integer(1024); | |
boolean test = a < b || a == b || a > b; | |
if (test) System.out.println("this won't happen"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment