I have run this program and the answer was 312 according to that and also on google it is mentioned that we can run try block without catch if we have finally. Try requires either catch or finally or both that is at least one catch or finally is compulsory. But you are saying that it is wrong.