home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / lang / ArrayIndexOutOfBoundsException.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  1.5 KB  |  56 lines

  1. /*
  2.  * @(#)ArrayIndexOutOfBoundsException.java    1.15 98/03/18
  3.  *
  4.  * Copyright 1994-1997 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.lang;
  16.  
  17. /**
  18.  * Thrown to indicate that an array has been accessed with an 
  19.  * illegal index. The index is either negative or greater than or 
  20.  * equal to the size of the array. 
  21.  *
  22.  * @author  unascribed
  23.  * @version 1.15, 03/18/98
  24.  * @since   JDK1.0
  25.  */
  26. public
  27. class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException {
  28.     /**
  29.      * Constructs an <code>ArrayIndexOutOfBoundsException</code> with no 
  30.      * detail message. 
  31.      */
  32.     public ArrayIndexOutOfBoundsException() {
  33.     super();
  34.     }
  35.  
  36.     /**
  37.      * Constructs a new <code>ArrayIndexOutOfBoundsException</code> 
  38.      * class with an argument indicating the illegal index. 
  39.      *
  40.      * @param   index   the illegal index.
  41.      */
  42.     public ArrayIndexOutOfBoundsException(int index) {
  43.     super("Array index out of range: " + index);
  44.     }
  45.  
  46.     /**
  47.      * Constructs an <code>ArrayIndexOutOfBoundsException</code> class 
  48.      * with the specified detail message. 
  49.      *
  50.      * @param   s   the detail message.
  51.      */
  52.     public ArrayIndexOutOfBoundsException(String s) {
  53.     super(s);
  54.     }
  55. }
  56.