Hi i am trying to construct a GameOfLife on java. I seem to be doign everything but the setpattern method correctly. the code compiles when but when trying to run the main method etc. or creating my own it does not let me.

this is my constructor and my setpattern method could anyone help.. i have been told by a colleague to write a forloop for the set pattern but i do not know how.

01 public class GameOfLife implements GameOfLife2DInterface {

02 private int rows;

03 private int columns;

04 private int grid[][];

05 private int emptyGrid[][];

06

07 /**

08 * Constructor for objects of class GameOfLife

09 */

10 public GameOfLife(int columns, int rows, int[][]pattern){

11 grid = new int [columns][rows];

12 setPattern(columns, rows, pattern);

13 this.columns=columns;

14 this.rows=rows;

15

16 }

17

18 public void setPattern(int columns, int rows, int[][]pattern){

19 grid = pattern;

20

21 }

thanks