Here you can find the source of printStackTrace(StackTraceElement[] elements)
public static void printStackTrace(StackTraceElement[] elements)
//package com.java2s; //License from project: Open Source License public class Main { public static void printStackTrace(StackTraceElement[] elements) { for (StackTraceElement stackTraceElement : elements) { System.err.println(stackTraceElement.toString()); }/*from w ww . ja v a2 s. c o m*/ System.err.println(""); } }