KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ExceptionLoad


1 /* ExceptionLoad.java */
2
3 /** A class which catches an exception. */
4
5 public class ExceptionLoad implements org.quilt.cl.RunTest {
6
7     public ExceptionLoad() { }
8
9     public void doSomething() { }
10
11     public int runTest(int x) {
12         try {
13             throw new Exception JavaDoc("Exception.");
14         } catch (Exception JavaDoc e) {
15             doSomething();
16         }
17         return x*x;
18     }
19 }
20
Popular Tags