Array Out Of Bounds, Args Issue

前端 未结 2 1005
青春惊慌失措
青春惊慌失措 2021-01-28 15:55

So when I compile, everything will compile just fine.

When I go to run the program, I get this error

Exception in thread \"main\" java.lang.ArrayI

相关标签:
2条回答
  • 2021-01-28 16:07

    You have not provided any command-line arguments to your application. Thus, args has no element 0.

    Provide an argument (the path to the file of interest) when invoking your application:

    java MyApp path/to/file
    0 讨论(0)
  • 2021-01-28 16:18

    You need to specify a parameter when you run the application.

    0 讨论(0)
提交回复
热议问题