Skip to content

Instantly share code, notes, and snippets.

@jonalv
Created September 7, 2010 15:18
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 jonalv/568516 to your computer and use it in GitHub Desktop.
Save jonalv/568516 to your computer and use it in GitHub Desktop.
1 public class Test {
2
3 public static void main(String[] _) {
4 Integer i = new Integer(0);
5 Integer j = new Integer(0);
6 System.out.println(i==j);
7 i = 0;
8 j = 0;
9 System.out.println(i==j);
10 i = Integer.valueOf(0);
11 j = Integer.valueOf(0);
12 System.out.println(i==j);
13 j = Integer.valueOf(0);
14 i = 0;
15 System.out.println(i==j);
16 }
17 }
18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment