模块 java.base
 java.lang

类 IndexOutOfBoundsException

所有已实现的接口:
Serializable
已知子类:
ArrayIndexOutOfBoundsException , StringIndexOutOfBoundsException

public class IndexOutOfBoundsException extends RuntimeException
抛出以指示某种索引(例如数组、字符串或向量)超出范围。

应用程序可以子类化此类以指示类似的异常。

自从:
1.0
参见:
  • 构造方法详细信息

    • IndexOutOfBoundsException

      public IndexOutOfBoundsException()
      构造一个没有详细信息的 IndexOutOfBoundsException
    • IndexOutOfBoundsException

      public IndexOutOfBoundsException(String  s)
      使用指定的详细消息构造一个 IndexOutOfBoundsException
      参数:
      s - 详细信息
    • IndexOutOfBoundsException

      public IndexOutOfBoundsException(int index)
      使用指示非法索引的参数构造一个新的 IndexOutOfBoundsException 类。

      该索引包含在此异常的详细消息中。详细消息的确切表示格式未指定。

      参数:
      index - 非法索引。
      自从:
      9
    • IndexOutOfBoundsException

      public IndexOutOfBoundsException(long index)
      使用指示非法索引的参数构造一个新的 IndexOutOfBoundsException 类。

      该索引包含在此异常的详细消息中。详细消息的确切表示格式未指定。

      参数:
      index - 非法索引。
      自从:
      16