Which of the following statements are true?
1. A try clause must have a matching catch and finally clause
2. A try clause can be used without a matching finally or catch clause
3. A try clause can be used with a matching finally clause and no catch clause.
Key is :
Try clause should be followed by atleast one catch clause or finally clause
1) A try clause must have a matching catch and finally clause
ans : this statement specifies that try should have both.so it is false
2) A try clause can be used without a matching finally or catch clause
ans : this statement specifies that try can occur without both catch and finally so its also false
3)A try clause can be used with a matching finally clause and no catch clause.
ans: this statement specify that try can occur without catch clause and with finally clause.This is true.
Hope now UR clear