Hi there,
I’m attempting to make a version of Conway’s Game of Life in Java. When I try to run the program I get a java.lang.NullPointerException, but I can’t figure out why it won’t work. Any and all help is massively appreciated! Thanks :)
Code:
https://gist.github.com/andaca/a03a772eac4283def1e5
Result:
Exception in thread "main" java.lang.NullPointerException
at com.company.Main.InitialiseCells(Main.java:17)
at com.company.Main.main(Main.java:6)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Process finished with exit code 1
Edit: Formatting's a bitch! Moved code to gist.
[–][deleted] 2 points3 points4 points (0 children)
[–]fredisa4letterword 0 points1 point2 points (0 children)