When an exception is thrown, there are many methods. First, we will introduce two commonly used methods.
I used system. Out. println (E );
This method prints an exception and outputs the exception, but it is different from another E. printstacktrace () method. The latter also prints an exception, but it also displays a deeper call Information.
For example:
A extends ---> B extends ----> C
When a problem occurs during the creation of a, an exception is thrown.
System. Out. println (e), in addition to the standard exception, only print at a and then output layer by layer.
E. printstacktrace (), in addition to standard exceptions, print
At C
At B
At
... And then investigate the outer layer.
The same is true in the case of an external investigation. The system will return to com. Sun. MIDP. Main.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.