What is the value of i when the exception occurs?
If environment[i] is null you would get the exception on the following line.
System.out.println(environment[i].getPoint());
The call to getPoint...
Type: Posts; User: Norm
What is the value of i when the exception occurs?
If environment[i] is null you would get the exception on the following line.
System.out.println(environment[i].getPoint());
The call to getPoint...
Then the variable environment is not null. If it is not null then you will not get a NullPointerException.
Check that you are looking at the correct line.
Did you add the println statement? What did it print out?
There is a variable on line 121 that has a null value. Look at line 121 and find the variable that has the null value and then backtrack in the code to find why it does not have a valid non-null...
You need to post the full text of the error message that shows what the error is and where it happened.
You can initialize an array when you define it and not have to use dozens of assignment...