chaitanya ashtekar wrote: >compiles but does not run.i have tried changing `args[0]`to `args[1]`
still the output of cmd is this:
H:\jp>java ma
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at ma.main(ma.java:7)
Well, since you didn't pass any actual parameters to the program, there isn't an args[0]. And likewise, there isn't an args[1] either.
Henry