This site requires JavaScript, please enable it in your browser!
Greenfoot back
Link99
Link99 wrote ...

2016/6/5

NullExceptionPointer

Link99 Link99

2016/6/5

#
My game has compiled successfully but the null exception pointer error keeps showing up even there are no errors, how do I solve this.
danpost danpost

2016/6/6

#
Just because a project compiles, it does not mean that you will not get any errors. Compiling will catch syntax error (spelling, punctuation and use of symbols) as well as things like accessibility of methods and fields and proper type-casting of elements within the code. But there are some errors that the compiler cannot predict on. These are called run-time errors. In java, these are called "exceptions". Anytime an exception is thrown, it is either caught (by code created specifically designed to detect the error) or it is not caught and the scenario is terminated and a message will be put to the terminal window. The data given is very informative and can lead you to where your code went wrong. Clear the terminal output and recreate the error. Then post the terminal output here. Do not change your code once the error has occurred or the output may not be as useful.
You need to login to post a reply.