KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > compliance > server > support > ConstructorTest4


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8 package test.compliance.server.support;
9
10 /**
11  * Support class which fails with an unchecked exception in static initializer.
12  *
13  * @author <a HREF="mailto:juha@jboss.org">Juha Lindfors</a>.
14  * @version $Revision: 1.1 $
15  *
16  */

17 public class ConstructorTest4
18 {
19
20    static
21    {
22       Object o = null;
23       o.toString(); // causes NPE!
24
}
25    
26 }
27       
28
29
30
31
Popular Tags