FileDocCategorySizeDatePackage
TestOverrideThread.javaAPI DocExample927Wed Mar 10 23:25:56 GMT 2004javathreads.examples.ch13

TestOverrideThread

public class TestOverrideThread extends Object implements Runnable

Fields Summary
Constructors Summary
Methods Summary
public static voidalertAdministrator(java.lang.Throwable e)

        // Use Java Mail to send the administrator's pager an email
        System.out.println("Adminstrator alert!");
        e.printStackTrace();
    
public static voidmain(java.lang.String[] args)

        Thread t = new Thread(new TestOverrideThread());
        t.setUncaughtExceptionHandler(new OverrideExceptionHandler());
        System.out.println(t.getUncaughtExceptionHandler());
        t.start();
    
public voidrun()

        ArrayList al = new ArrayList();
        while (true) {
            al.add(new byte[1024]);
        }