Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
[ 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions