1. /*
  2. * @(#)ArrayIndexOutOfBoundsException.java 1.18 00/02/02
  3. *
  4. * Copyright 1994-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package java.lang;
  11. /**
  12. * Thrown to indicate that an array has been accessed with an
  13. * illegal index. The index is either negative or greater than or
  14. * equal to the size of the array.
  15. *
  16. * @author unascribed
  17. * @version 1.18, 02/02/00
  18. * @since JDK1.0
  19. */
  20. public
  21. class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException {
  22. /**
  23. * Constructs an <code>ArrayIndexOutOfBoundsException</code> with no
  24. * detail message.
  25. */
  26. public ArrayIndexOutOfBoundsException() {
  27. super();
  28. }
  29. /**
  30. * Constructs a new <code>ArrayIndexOutOfBoundsException</code>
  31. * class with an argument indicating the illegal index.
  32. *
  33. * @param index the illegal index.
  34. */
  35. public ArrayIndexOutOfBoundsException(int index) {
  36. super("Array index out of range: " + index);
  37. }
  38. /**
  39. * Constructs an <code>ArrayIndexOutOfBoundsException</code> class
  40. * with the specified detail message.
  41. *
  42. * @param s the detail message.
  43. */
  44. public ArrayIndexOutOfBoundsException(String s) {
  45. super(s);
  46. }
  47. }