Module java.base 模块java.base
Package java.lang 包. lang

Class ArithmeticException

  • All Implemented Interfaces:

    public class ArithmeticException
    extends RuntimeException
    Thrown when an exceptional arithmetic condition has occurred. For example, an integer "divide by zero" throws an instance of this class. ArithmeticException objects may be constructed by the virtual machine as if suppression were disabled and/or the stack trace was not writable.
    发生异常算术条件时抛出。例如,整数“除零”抛出该类的一个实例。 ArithmeticException 对象可以由虚拟机构造,就像禁用了抑制和/或堆栈跟踪不可写一样。
    Since: 自:
    See Also: 参见:
    Serialized Form 序列化形式
    • Constructor Detail 构造函数的细节

      • ArithmeticException

        public ArithmeticException​()
        Constructs an ArithmeticException with no detail message.
        构造一个没有详细信息的 ArithmeticException
      • ArithmeticException

        public ArithmeticException​(String s)
        Constructs an ArithmeticException with the specified detail message.
        用指定的详细信息消息构造一个 ArithmeticException
        Parameters: 参数:
        s - the detail message.
        s -详细信息。