Descriptive Question

Quiz Guidelines

 

QID: 
50
Tags: 
Validated against: 
java8
Question: 

Predict output:

public class ExceptionCheck {

	static int i = 10;

	public static void main(String[] argds) {
		System.out.println(myMethod());
		System.out.println(i);
	}

	public static int myMethod() {
		try {
			throw new RuntimeException();
		} finally {
			i = 12;
		}
	}
}

 

Q&A Set: