KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > lang > ArrayStoreException


1 /*
2  * @(#)ArrayStoreException.java 1.11 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 to indicate that an attempt has been made to store the
12  * wrong type of object into an array of objects. For example, the
13  * following code generates an <code>ArrayStoreException</code>:
14  * <p><blockquote><pre>
15  * Object x[] = new String[3];
16  * x[0] = new Integer(0);
17  * </pre></blockquote>
18  *
19  * @author unascribed
20  * @version 1.11, 12/19/03
21  * @since JDK1.0
22  */

23 public
24 class ArrayStoreException extends RuntimeException JavaDoc {
25     /**
26      * Constructs an <code>ArrayStoreException</code> with no detail message.
27      */

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

38     public ArrayStoreException(String JavaDoc s) {
39     super(s);
40     }
41 }
42
43
Popular Tags