run method question
privatevoid testThread(int i)throws Exception{
try{
MyThread mt =new MyThread();
mt.setName("name " + i);
mt.start();
}catch (Exception e){
System.out.println("Exception caugh");
thrownew Exception("testst223");
}
}
}
class MyThreadextends Thread{
publicvoid run(){
while (!isInterrupted()){
System.out.println("aaaaa " + Thread.currentThread().getName());
thrownew RuntimeException("testexception");
}
}
}
why doesnt this code reach Exception caugh"); code

