1 2 3 import org.quilt.cl.RunTest; 4 5 6 7 public class Finally implements RunTest { 8 private int value = -2; 9 10 public Finally() { } 11 12 public void setValue( int i ) { 13 value = i; 14 } 15 16 19 public int runTest(int x) { 20 try { 21 if (x == 1) { 22 throw new Exception ("Finally Exception"); 23 } 24 } catch ( Exception e) { 25 ; 26 } finally { 27 setValue( -1 ); 28 } 29 return value; 30 } 31 } 32 | Popular Tags |