asked in Exception by (58.6k points)

1 Answer

Fresher and experienced java developers must be well versed with this exception handling interview question in java.
try or try-catch block can be followed by finally block in java >

    try-finally block, or

              //Code to be enclosed in try-finally block

    try-catch-finally block.

              //Code to be enclosed in try-catch-finally block
       }catch(Exception e){

finally block can can only exist if try or try-catch block is there, finally block can’t be used alone in java.
answered by (58.6k points)

Java Interview Questions and Answers 2018