104
Java Thread getDefaultUncaughtExceptionHandler() method
The getDefaultUncaughtExceptionHandler() method of thread class returns the default handler invoked when a thread abruptly terminates due to an uncaught exception. If the returned value is null, there is no default.
Syntax
Return
This method returns the default handler.
Example
Output:
null Currently running thread is: Thread-0 Currently running thread is: Thread-1
Next Topicmultithreading in java