import java.awt.*;
import java.applet.*;
public class Exception1 extends Applet
{
int num1i = 10;
int num2i = 0;
public void init()
{
try
{
System.out.println("10 / 0 = " + (num1i / num2i));
}
catch (Exception ae)
{
System.out.println("The following error was trapped - " + ae);
System.out.println("The program continues");
}
System.out.println("Finished");
}
}
|