You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
e.printStackTrace();//we will get name(e.g. java.lang.ArithmeticException) and
15
+
// description(e.g. / by zero) of an exception separated by colon, and stack
16
+
// trace (where in the code, that exception has occurred) in the next line.
17
+
System.out.println(e);
18
+
System.out.println("by toString() mrthod");//we will only get name and description of an exception. Note that this method is overridden in Throwable class.
19
+
20
+
System.out.println(e.toString());
21
+
22
+
System.out.println("By getMessage()");// we will only get description of an exception.
0 commit comments