final in "foreach" loop

This commit is contained in:
Andrey Starovoyt
2014-05-23 17:49:50 +04:00
parent 0c86e1ed87
commit 438a3e28ae
4 changed files with 36 additions and 5 deletions
@@ -0,0 +1,6 @@
public class Foo {
void m() {
Object[] xs = new Object[]{1, 2, 3};
xs.for<caret>
}
}
@@ -0,0 +1,8 @@
public class Foo {
void m() {
Object[] xs = new Object[]{1, 2, 3};
for (final Object x : xs) {
<caret>
}
}
}