Manejo de excepción interrumpida en Java
¿Cuál es la diferencia entre las siguientes formas de manejo?InterruptedException
? ¿Cuál es la mejor manera de hacerlo?
try{
//...
} catch(InterruptedException e) {
Thread.currentThread().interrupt();
}
O
try{
//...
} catch(InterruptedException e) {
throw new RuntimeException(e);
}
EDITAR: Me gustaría saber también en qué escenarios se utilizan estos dos.