I am go through a socket program. In that printStackTrace is caught by the catch block. Actully what it is?
catch(IOException ioe)
{
ioe.printStackTrace();
}
I am unaware of it. For what they are used?
I am go through a socket program. In that printStackTrace is caught by the catch block. Actully what it is?
catch(IOException ioe)
{
ioe.printStackTrace();
}
I am unaware of it. For what they are used?
It prints the stack trace of the Exception
to System.err
.
It's a very simple, but very useful tool for diagnosing an Exception. It tells you what happened and where in the code this happened.