It is knows that Runtime excpetions should not be caught (usually), For example NullPointer.
But if I have a catch block that catches the general class - Exception (not recommended, I know) it will catch both checked and unchecked excpetions.
The thing I don't understand is this:
One can catch only Runtime Excpetions by writing:
catch(RuntimeException ex)
but not only checked excpetions, why?
(I mean, what is the logic behind this?)
Why there is no class called Checked Exception in Java that all checked excpetions will be derived from (just like RuntimeExcpetion) so I will be able to catch only those exceptions?