I'm trying to write practice code for a GCSE exercise, but for some reason the counter doesn't work, despite the fact that I'm using the code given on this site. Can anyone help?
The terminal window comes up with the error message: java.lang.NullPointerException
and the issue is in this line: Counter counter = oceanWorld.getCounter();
What's wrong with the code in this line?