How to read the error code of java
What does the error code that appears when the java program is running mean, as follows Let’s learn how to understand Java error codes.
For example, there is such an error:
Exception in thread "mian" java.lang.NullPointerException at HuffmanTree.indexOf(HuffmanTree.java:96) at HuffmanTree. contain(HuffmanTree.java:104) at HuffmanTree.<init>(HuffmanTree.java:16) at HuffmanTree.main(HuffmanTree.java:123)
Understand the error code of java
1.Exception in thread "mian" java.lang.NullPointerException, this sentence tells you what exception was reported, here it is: null pointer.
2. The following four lines are the method call chain, and the top one is the last one called. In other words, the exception occurred in the indexOf method of the HuffmanTree class. The abnormal code is in line 96 of the HuffmanTree.java file.
3. The following three lines can basically be ignored. Those numbers are the line numbers of the code.
php Chinese website, a large number of free Java introductory tutorials, welcome to learn online!
The above is the detailed content of How to read java error codes. For more information, please follow other related articles on the PHP Chinese website!