KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > lang > InstantiationException


1 /*
2  * @(#)InstantiationException.java 1.17 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.lang;
9
10 /**
11  * Thrown when an application tries to create an instance of a class
12  * using the <code>newInstance</code> method in class
13  * <code>Class</code>, but the specified class object cannot be
14  * instantiated because it is an interface or is an abstract class.
15  *
16  * @author unascribed
17  * @version 1.17, 12/19/03
18  * @see java.lang.Class#newInstance()
19  * @since JDK1.0
20  */

21 public
22 class InstantiationException extends Exception JavaDoc {
23     /**
24      * Constructs an <code>InstantiationException</code> with no detail message.
25      */

26     public InstantiationException() {
27     super();
28     }
29
30     /**
31      * Constructs an <code>InstantiationException</code> with the
32      * specified detail message.
33      *
34      * @param s the detail message.
35      */

36     public InstantiationException(String JavaDoc s) {
37     super(s);
38     }
39 }
40
Popular Tags