printStackTrace in java
It prints the short description of the exception(using toString()) + a stack trace for this exception on the error output stream(System.err). Constructors public void printStackTrace() public void printStackTrace(PrintStream s) public void printStackTrace(PrintWriter s) Example: printStackTrace() public class Main { public static void main(String[] args) { int num1= 35, num2 = 0; try { … Read more