What will be the output of the following code?

Last Updated :
Discuss
Comments

What will be the output of the following code?

Java
public class Geeks {
    public static void main(String[] args) {
        try {
            System.out.println("Inside try");
            throw new RuntimeException("Error");
        } finally {
            System.out.println("Inside finally");
        }
    }
}


Inside try

Inside try Inside finally

Inside try Inside finally RuntimeException

Compilation Error

Share your thoughts in the comments