mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 02:14:44 +00:00
val in java, including tests and javac resolution utilities.
This commit is contained in:
1 parent
d9ba2a191a
commit
f1cf083890
16 files changed
+941
No files matched your search
@@ -0,0 +1,20 @@
|
||||
public class ValInFor {
|
||||
{
|
||||
val x = 10;
|
||||
val x2 = -1;
|
||||
val a = "Hello";
|
||||
for (val y = x, z = x2; y < 20; y++) {
|
||||
val q = y;
|
||||
val w = z;
|
||||
val v = a;
|
||||
}
|
||||
}
|
||||
|
||||
/* public void enhancedFor() {
|
||||
java.util.List<String> list = java.util.Arrays.asList("Hello, World!");
|
||||
for (val shouldBeString : list) {
|
||||
System.out.println(shouldBeString.toLowerCase());
|
||||
val shouldBeString2 = shouldBeString;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
Reference in new issue
Block a user