FileDocCategorySizeDatePackage
StackTrace.javaAPI DocExample877Thu Feb 14 13:58:50 GMT 2002myprojects.stacktrace

StackTrace.java

/*
 * @(#)StackTrace.java 1.0 02/02/03
 *
 * You can modify the template of this file in the
 * directory ..\JCreator\Templates\Template_1\Project_Name.java
 *
 * You can also create your own project template by making a new
 * folder in the directory ..\JCreator\Template\. Use the other
 * templates as examples.
 *
 */
package myprojects.stacktrace;

import java.awt.*;
import java.awt.event.*;

class StackTrace {
	public StackTrace() {
		method1();
	}
	public int method1() {
		return method2();
	}
	
	public int method2() {
		return method3();
	}
	
	public int method3() {
		// Deliberately generate a divide by zero arithmetic exception
		int num=46;
		int denom=0;
		return num/denom;
	}

	public static void main(String args[]) {
		System.out.println("Starting StackTrace...");
		StackTrace mainFrame = new StackTrace();
	}
}