You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Arguments.java 409B

12345678910111213141516171819202122
  1. //package debugger;
  2. public class Arguments {
  3. String[] args;
  4. public static void main(String[] args) {
  5. new Arguments(args).go();
  6. }
  7. Arguments(String[] args) {
  8. this.args = args;
  9. }
  10. void go () {
  11. int i = -1;
  12. String s = "";
  13. while ((++i) < args.length) {
  14. s = args[i];
  15. System.out.println("[" + i + "] " + s);
  16. }
  17. }
  18. }