Analyze the output from the exception's printStackTrace() method - Java Object Oriented Design

Java examples for Object Oriented Design:Exception

Description

Analyze the output from the exception's printStackTrace() method

Demo Code

public class Main {
  public static void main(String[] args) {
    startProcess();/*from  w  w  w .  ja v  a 2 s . c o m*/
  }

  private static void startProcess() {
    try {
      int a = 5 / 0;
    } catch (Exception e) {
      e.printStackTrace();
    }

  }
}

Result


Related Tutorials