diff options
Diffstat (limited to 'tests/debugger/Arguments.java')
-rw-r--r-- | tests/debugger/Arguments.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/debugger/Arguments.java b/tests/debugger/Arguments.java new file mode 100644 index 000000000..3cb6c3ff2 --- /dev/null +++ b/tests/debugger/Arguments.java @@ -0,0 +1,22 @@ +//package debugger; + +public class Arguments { + String[] args; + + public static void main(String[] args) { + new Arguments(args).go(); + } + + Arguments(String[] args) { + this.args = args; + } + + void go () { + int i = -1; + String s = ""; + while ((++i) < args.length) { + s = args[i]; + System.out.println("[" + i + "] " + s); + } + } +} |