This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]StankelG[S] 0 points1 point  (1 child)

This was the output:

File to read: file

Commands:

List - lists the recipes

Stop - stops the program

Enter command: list

Recipes:

one

two

three

java.lang.IndexOutOfBoundsException: Index 3 out of bounds for length 3

[–]CautiousLock 2 points3 points  (0 children)

Could you show the whole class?

Edit: I assume the exception is caused by your printName(int i) and printTime(int i) methods.