Throwable.getSuppressed() has the following syntax.
public final Throwable [] getSuppressed()
In the following code shows how to use Throwable.getSuppressed() method.
// w w w.j a va 2 s . c o m public class Main { public static void main(String[] argv) { Throwable t = new Exception("from java2s.com"); System.out.println(t.getSuppressed()); } }
The code above generates the following result.