Java - Exception Handling
Which of the following correctly demonstrates the placement of a finally block in a Java try-catch structure?
Which of the following correctly demonstrates the placement of a finally block in a Java try-catch structure?
finally block must come after all catch blocks.finally after catch. try { /* code */ } finally { /* cleanup */ } catch(Exception e) { /* handle */ } places finally before catch, which is invalid. try { /* code */ } catch(Exception e) { /* handle */ } omits finally. finally { /* cleanup */ } try { /* code */ } catch(Exception e) { /* handle */ } places finally before try, which is invalid.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions