#What does it mean when it says "Index 0 out of bounds for length 0"
10 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @surreal pelican! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
It means the args array is empty
Basically you start counting at zero
If array is of length 1, the max index is 0, length 2 - index 1, etc.
if an array is empty, then it will throw an exception, because index 0 does not exist
basically you will want to add a check if array has more than 0 elements
So
if (args.length > 0) {
StackAITester maze = new StackAITester(args[0]);
maze.walkBoard();
}
gotya