I'm losing the will to live now.
I have created a class that simply initializes a number an then has a function that returns it. If I run the class normally it will return the number fine but whenever I want to create an array, it returns an exception.
This initializes the array and prints the number to the the console:
public Game() { player[] p; p = new player[1]; System.out.print(p[0].getX()); }
And the class:
public class player { int x, y; public player() { x=100; y=100; } public int getX() { return x; } }