Question: [ 1596] What is the output from the following program? Note: if an exception is not handled, then the program is terminated immediately class Test

 [ 1596] What is the output from the following program? Note:

[ 1596] What is the output from the following program? Note: if an exception is not handled, then the program is terminated immediately class Test ( public statie void main(Stringll argv) static void f10 t throw new RuntimeException"hello");: try catch (Exception e) t System.out.printin("main-1"); finally statie void 120 System.out.printin("main-2"); try f10: try System.out.printin("hello 12-1"); catch (Exception e) System.out.println("12-1"); 1 finally flo: catch (Exception e) t System.out.println("main-3"); finally t System.out.println"main-4"); System.out.println("12-2"); try t 110: try 120: finally System.out.printin("hello 12-2"); t p ten cut:printa rmai- finally System.out.printin("12-3"): System.out.println"main-6"); End class Test System.out.printin"12-4")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!