Home > Java > JavaBase > How to read java error codes

How to read java error codes

angryTom
Release: 2019-11-20 14:34:37
Original
5101 people have browsed it

How to read java error codes

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)
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template