Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.lang

Class ArithmeticException

java.lang.Object
|
+--java.lang.Throwable
   |
   +--java.lang.Exception
      |
      +--java.lang.RuntimeException
         |
         +--java.lang.ArithmeticException


public class ArithmeticException

extends RuntimeException

Thrown when a math error has occured, such as trying to divide an integer by zero. For example:
 int i = 0;
 int j = 2 / i;
 

Authors:

Constructor Summary

ArithmeticException()

Create an exception without a message.
ArithmeticException(java.lang.String s)

Create an exception with a message.

Constructor Details

ArithmeticException

public ArithmeticException()

Create an exception without a message.


ArithmeticException

public ArithmeticException(java.lang.String s)

Create an exception with a message.

Parameters: