java.lang
Class NegativeArraySizeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by 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];
 


Constructor Summary
NegativeArraySizeException()
          Create an exception without a message.
NegativeArraySizeException(String s)
          Create an exception with a message.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
getCause, getLocalizedMessage, getMessage, initCause, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NegativeArraySizeException

public NegativeArraySizeException()
Create an exception without a message.


NegativeArraySizeException

public NegativeArraySizeException(String s)
Create an exception with a message.

Parameters:
s - the message