C
christian.bongiorno
Everyday I learn something new about Java. Ok, maybe not everyday but
frequently enough
Example:
public class Test {
private static final String logger = null;
public static void main(String[] args) throws Exception {
try {
logger.toString();
}
catch (Exception e) {
throw new IllegalArgumentException();
}
finally {
System.out.println("finally run");
}
}
}
I did not know that the finally clause did not apply to the catch
portion of the syntax. My questions are: Why not? What would be the
harm? And, are there anymore caveats?
Christian Bongiorno
http://christian.bongiorno.org/resume.pdf
frequently enough
Example:
public class Test {
private static final String logger = null;
public static void main(String[] args) throws Exception {
try {
logger.toString();
}
catch (Exception e) {
throw new IllegalArgumentException();
}
finally {
System.out.println("finally run");
}
}
}
I did not know that the finally clause did not apply to the catch
portion of the syntax. My questions are: Why not? What would be the
harm? And, are there anymore caveats?
Christian Bongiorno
http://christian.bongiorno.org/resume.pdf