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