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

Class NegativeArraySizeException

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


public class NegativeArraySizeException

extends RuntimeException

Thrown when an attempt is made to create an array with a negative size. For example:
 int i = -1;
 int[] array = new int[i];
 

Authors:

Constructor Summary

NegativeArraySizeException()

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

Create an exception with a message.

Constructor Details

NegativeArraySizeException

public NegativeArraySizeException()

Create an exception without a message.


NegativeArraySizeException

public NegativeArraySizeException(java.lang.String s)

Create an exception with a message.

Parameters: