ThreadDemo.java Source code

Java tutorial

Introduction

Here is the source code for ThreadDemo.java

Source

class ThreadDemo extends Thread {

    public void run() {
        System.out.println("Thread = " + getName());

        Thread.UncaughtExceptionHandler handler = getUncaughtExceptionHandler();
        System.out.println(handler);
    }

}

public class Main {

    public static void main(String[] args) {

        ThreadDemo t = new ThreadDemo();
        t.start();
    }

}