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

2013/4/14

java.lang.NullPointerException

JetLennit JetLennit

2013/4/14

#
Now, I have had/fixed this many times.... but what exactly is a "java.lang.NullPointerException"?
Gevater_Tod4711 Gevater_Tod4711

2013/4/14

#
If a method should return an object which contains a method and you call this method like this methodReturningAnObject().methodOfTheReturnedObject(); It is possible that the first method returns null. That would be the same as null.methodOfTheReturnedObject(); what doesn't realy make sense. In this cases you get a NullPointerException which tells you that something went wrong.
You need to login to post a reply.