Here you can find the source of printStackTrace(PrintStream out, StackTraceElement[] stackTrace)
public static void printStackTrace(PrintStream out, StackTraceElement[] stackTrace)
//package com.java2s; //License from project: Apache License import java.io.PrintStream; public class Main { public static void printStackTrace(PrintStream out, StackTraceElement[] stackTrace) { for (int i = 2; i < stackTrace.length; i++) { StackTraceElement stackTraceElement = stackTrace[i]; out.println("\tat " + stackTraceElement); }//from www. j av a 2 s . c o m } public static void printStackTrace(StackTraceElement[] stackTrace) { printStackTrace(System.err, stackTrace); } }