Skip to content

Instantly share code, notes, and snippets.

@tedheich
Created November 19, 2009 08:36
Show Gist options
  • Save tedheich/238641 to your computer and use it in GitHub Desktop.
Save tedheich/238641 to your computer and use it in GitHub Desktop.
double equal versus equal method
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