Java Stacktrace Print printStackTrace()

Here you can find the source of printStackTrace()

Description

print Stack Trace

License

Open Source License

Declaration

public static void printStackTrace() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static void printStackTrace() {
        StackTraceElement[] trace = Thread.currentThread().getStackTrace();
        for (int i = trace.length - 1; i >= 0; i--)
            System.out.println("trace[" + i + "] " + trace[i].getClassName() + "." + trace[i].getMethodName());

    }//from w w w .  jav  a2  s .com
}

Related

  1. printStackTrace()
  2. printStackTrace()
  3. printStackTrace()
  4. printStackTrace()
  5. printStackTrace()
  6. printStackTrace()
  7. printStackTrace()
  8. printStackTrace()
  9. printStackTrace()