Skip to content

Instantly share code, notes, and snippets.

@jeremyheiler
Created February 11, 2015 16:34
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 jeremyheiler/1eb2519d0f583f6b5a0d to your computer and use it in GitHub Desktop.
Save jeremyheiler/1eb2519d0f583f6b5a0d to your computer and use it in GitHub Desktop.
public class Main {
public static void main(String[] args) {
Integer a = Integer.valueOf(1);
Integer b = Integer.valueOf(1);
System.out.println("a == b -> " + (a == b));
Integer c = Integer.valueOf(1234);
Integer d = Integer.valueOf(1234);
System.out.println("c == d -> " + (c == d));
}
}
@jeremyheiler
Copy link
Author

~:$ javac Main.java
~:$ java Main
a == b -> true
c == d -> false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment