Anyone can explain to me what should i do to pass it and how it works?
package com.codegym.task.task25.task2510;
/*
Wait and see
*/
public class Solution extends Thread {
public Solution() {
setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread myThread, Throwable e) {
if (e.getCause() instanceof Error) {
System.out.println("Can't keep running");
}
if (e.getCause () instanceof Exception) {
System.out.println("Needs handling");
}
if ( e instanceof Throwable) {
System.out.println("Wait and see");
}
}
});
}
public static void main(String[] args) {
}
}