Returning value in try catch and finally

 

 

class Test{
	public int m1() {
		try {
			return 4;
		}catch(Exception e) {
			System.out.println(e);
			return 6;
		}finally {
			return 5;
		}
	}
}
public class Employee {
public static void main(String[] args) {
	Test t1 = new Test();
	System.out.println(t1.m1());
}
}

Output  is  5