What is the use of printStackTrace() method in Java?

后端 未结 10 1836
不知归路
不知归路 2020-12-02 06:35

I am going through a socket program. In it, printStackTrace is called on the IOException object in the catch block.
What does printStackT

10条回答
  •  清歌不尽
    2020-12-02 07:12

    The printStackTrace() helps the programmer understand where the actual problem occurred. The printStackTrace() method is a member of the class Throwable in the java.lang package.

提交回复
热议问题