One further question. I have included an excerpt of code below:
public class Final_Test
{
public static void main(
String[] args)
{
try {
System.out.println("First Line");
System.exit(0);
}
finally {
System.out.println("Finally Line");
}
}
}
I thought that the finally clause would execute before the application exited but discovered that it does not as I understood the finally clause to always execute regardless of what occurs. Is this statement true in all cases except for the System.exit() method invocation? Are there additional cases similar to this?