Skip to content

Instantly share code, notes, and snippets.

@Wicowyn
Created May 30, 2017 07:55
Show Gist options
  • Save Wicowyn/225ba2653f0bc390ffc207a5ba7eb5f3 to your computer and use it in GitHub Desktop.
Save Wicowyn/225ba2653f0bc390ffc207a5ba7eb5f3 to your computer and use it in GitHub Desktop.
How I have broke Java
for(int i = 126; i < 130; i++) {
Integer n1 = i;
Integer n2 = i;
System.out.println(String.format("%d => %b", i, n1 == n2));
}
/* Out :
126 => true
127 => true
128 => false
129 => false
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment