Skip to content

Instantly share code, notes, and snippets.

@lukas2
Created November 29, 2010 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukas2/720375 to your computer and use it in GitHub Desktop.
Save lukas2/720375 to your computer and use it in GitHub Desktop.
public class App {
public static void main(String[] args) {
Integer b = 400;
Integer c = 400;
System.out.println(b == c); // => false
Integer b1 = 1;
Integer c1 = 1;
System.out.println(b1 == c1); // => true
Integer b2 = new Integer(1);
Integer c2 = new Integer(1);
System.out.println(b2 == c2); // => false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment