KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ExceptionThrow


1 /* ExceptionThrow.java */
2
3 /** Intentionally throws a NullPointerException. */
4
5 public class ExceptionThrow {
6
7     private static ExceptionThrow _instance = null;
8
9     public void doSomething() { };
10
11     public int runTest(int x) {
12         _instance.doSomething();
13         return x*x;
14     }
15 }
16
Popular Tags