Java Data Type Tutorial - Java Throwable.getSuppressed()








Syntax

Throwable.getSuppressed() has the following syntax.

public final Throwable [] getSuppressed()

Example

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.