blob: af13540ebac64e2046b67d6885e9b8693278a3a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;
}
}*/
}
|