diff options
Diffstat (limited to 'tests/base/test126/Driver.java')
-rw-r--r-- | tests/base/test126/Driver.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/base/test126/Driver.java b/tests/base/test126/Driver.java new file mode 100644 index 000000000..e855c5781 --- /dev/null +++ b/tests/base/test126/Driver.java @@ -0,0 +1,18 @@ +public class Driver { + public static void main(String[] args) { test(); } + + public static void test() { + + // local variable declaration in the init part of a for + for (int i = 0, j = 0; j < 10 ; i++, j++) { + j++; + } + int m, n, j = 0; + + // init part without local var declaration + for (m = 0, n = 0; j < 10 ; m++, n++) { + j++; + m++; + } + } +} |