Given the following code, trace the code starting at line 5. What method activation records are on the call stack from top to bottom at line 10?


public static void main(String[] args) {
    method1();
} // end main

public static void method1() {
    method2();
    String message = new String("scope1");
    method2();
    System.out.println(message);
}

public static void method2() {
    method3();
    String message2 = new String("scope2");
    method4();
    message2 = "still scope2";
    method3();
    System.out.println(message2);
}

public static void method3() {
    method4();
}

public static void method4() {
    String message4 = new String("scope4");
    System.out.println(message4);
}

 
method1
  • method , method2, method3
  • method1, method2
  • method2, method1

There are no hints for this question