Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.PrintWriter;
import java.io.StringWriter;

public class Main {
    public static void main(String args[]) {
        try {
            throw new Exception("for no reason!");
        } catch (Exception e) {
            StringWriter sw = new StringWriter();
            PrintWriter pw = new PrintWriter(sw);
            e.printStackTrace(pw);
            System.out.println(sw.toString().toUpperCase());
        }
    }
}