Java Throwable getSuppressed() methodThe getSuppressed() method of Java Throwable class is used to return an array of all the exceptions that were suppressed to deliver this exception. If no exception were suppressed, an empty array will be returned. SyntaxReturnAn array of exceptions that were suppressed to deliver this exception. Example 1Test it NowOutput: Caught inside Main: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at ThrowableGetSuppressedExample1.main(ThrowableGetSuppressedExample1.java:19)
Next TopicJava Throwable
|