Created
July 21, 2012 17:46
-
-
Save slezica/3156536 to your computer and use it in GitHub Desktop.
Java inconsistencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Asssignment: | |
a = b = c; | |
if (status = result()); | |
// Standard setters: | |
setA(setB(c)); // No. Setters return void. | |
if (setStatus(result()); // And again. Impossible. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Integer is abbreviated "int" | |
Integer.class boxes int.class | |
// Boolean is *not* abbreviated "bool" | |
Boolean.class boxes boolean.class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment