Hi,
When do we rethrow exception in catch block with different exception?
Say
class ExceptionClass
{
public static void main(String[] args){
try {
System.out.println(9/0);
}
catch(ArithmeticException e) {
throw new NullPointerException();
}
}
}
I wonder whether we can do like above and in what situations we do like above?
please advise