"Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 8
at Life.neighbors(Life.java:51)
The statement at line 51 used an index (8) that was past the end of the array. The array had less than 9 elements.
What statement is at line 51? What variable had the invalid value?
Remember that the valid indexes for an array range in value from 0 to the size-1. An index of 8 requires at least 9 elements in the array.
The code that checks the slots at the boundaries (top, right, bottom and left) of the rectangle must be careful to not go over the boundary.