Created
February 3, 2012 00:11
-
-
Save lqd/1726656 to your computer and use it in GitHub Desktop.
Lombok.val loop semantics modification
This file contains 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
int i = 0; | |
for (val s = "", j = 2; i < 1; ++i) // having different types for local variables is illegal in Java :) | |
{ | |
System.out.printf("s (%s): '%s'\n", s.getClass().getName(), s); | |
System.out.printf("j: '%s'\n", j); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment