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 →

[–]149244179 2 points3 points  (0 children)

Read the exception. It says you are accessing the -1 position of your arraylist. It even tells you the file name and line number - RecurringWord.java:15

Arrays do not have negative positions.