the method below was compiled without any compilation Error on Eclipse Using JDK 7; Strangely the same method on Inellij IDEA 14 with the same JDK 7 produce a compilation error, but it Run! Is this due to a bad configuration on my IDEA? Thanks :)
static void testException() throws FileNotFoundException, SQLException {
boolean zx = false;
try {
if (zx) {
throw new FileNotFoundException("1");
}
else {
throw new SQLException("2");
}
}
catch (Exception ex) {
throw (ex);
}
}