Home » JAVA Programming » Exceptions » Question
  1. What is the output of this program?
    public class Finally_Example
    {
    public static void main(String[] args)
    {
    try
    {
    return;
    }
    finally
    {
    System.out.println( "Finally block executed..." );
    }
    }
    }
    1. Compilation Error
    2. Runtime Error
    3. Finally block executed...
    4. All of above
    5. None of these
Correct Option: C

Output: Finally block executed...
Because finally will execute always.



Your comments will be displayed only after manual approval.