Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * Gets the stack trace string.
     *
     * @param e the e
     * @return the stack trace string
     */
    public static String getStackTraceString(Exception e) {
        String stackTrace = "";
        for (StackTraceElement l : e.getStackTrace())
            stackTrace += l.toString();
        return stackTrace;
    }
}