Yet Another SCJP2
help you means help me
Younes By constantly trying one ends up succeeding. Thus: the more one fails the more one has a chance to succeed.
Originally posted by Seany Iris: class MyException extends Exception {} public class TestClass { public static void main(String[] args) { TestClass tc = new TestClass(); try { tc.m1(); } catch (MyException e) { } try {tc.m1();} catch (MyException d) { }; finally { tc.m2(); } } public void m1() throws MyException { throw new MyException(); } public void m2() throws RuntimeException { throw new NullPointerException(); } } Why cann't it compile. Who can explain it to me?Give the error: TestClass.java:14: 'finally' without 'try' finally { tc.m2(); } ^ 1 error