Exercise 1C - List line numbers executed and output
1.public class Exercise1 {
2. static void f1() throws Exception {
3.   System.out.print("1");
4.   try {
5.     System.out.print("2");
6.     f2();
7.     System.out.print("3");
8.   }
9.   catch (Exception e) { System.out.print("4"); throw e; }
10.   finally {  System.out.print("5"); }
11.  System.out.println("6");
12. }
13.
13. static void f2 () throws Exception {
14.   if (true) throw new Exception();
15. }
16.
16. public static void main(String s[]) throws Exception {
17.       f1();
18. }
19.}
Lines: 16, 17, 2-6, 13, 14, 9-10
Output:
1245
Exception thread "main" java.lang.Exception
        at Exercise1.f2(Exercise1.java:15)
        at Exercise1.f1(Exercise1.java:6)
        at Exercise1.main(Exercise1.java:19)