QMoney Module 1 Milestone 1

On typing args[0] in debug console is giving me this-
args[0]
Cannot evaluate because of org.eclipse.debug.core.DebugException: Attempt to access illegal array index: 0.

breakpoint is at return Collections.emptyList();

Did u get same type of error in ding setup#2…

No, It was working fine back then but now (after I have successfully parsed JSON file) it is me giving this error.

PS: I am running debug mode after commenting all the code I’ve written.

don’t return a empty list…since you have parsed try after returning a non empty list…i think that should work

I already tried that… same error

You may be running the code directly and thus not passing any command line arguments to it.
Try to run the code with a different debug configuration. I think we had to use module 1. You can also pass your own command line arguments by adding them at the end of the command in terminal.

  1. Put breakpoints on correct line numbers.
  2. When you run your program in debug mode your program pauses on breakpoints you set.
  3. In debug terminal use args[0]

The error you’re getting is simple and easily understandable you’re not passing arguments when you’re running a code.

running java code with arguments
compilation

javac abc.java

running with arguments

java abc.class “Hello” “world”

Now, Just google it and understand how to pass command-line arguments in java.
Then understand command given in MS 1 of module 1.