且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

java.lang.NullPointerException

更新时间:2021-07-31 08:36:28

java.lang.NullPointerException
这只是意味着您正在尝试使用实际上是NULL的对象的属性

在引发此异常的地方进行调试,然后检查是否有任何对象为NULL并尝试使用其属性.


仅用于您的知识库和参考 [调试java.lang.NullPointerException的建议 [
java.lang.NullPointerException
This simply means that you are trying to use a property of an object which is actually a NULL

DEBUG around the lines from where this exception is thrown and then check if any object is NULL whose property you are trying to use.


Just for your knowledgebase and reference[^].

This also is a good one: Suggestions for debugging java.lang.NullPointerException[^]


如果要发布StackTrace和行号查找错误会容易得多...此外,您可以将从Math.Min等获得的温度值分配给局部变量,这样stacktrace可能会更加准确...

干杯,阿恩特
If you would post the StackTrace and linenumbers it would be much easyer to look for an error... Additionally, you can assing the temp-values you get from Math.Min etc. to local variables, so the stacktrace might be even more accurate...

Cheers, Arndt