java.lang
Class NegativeArraySizeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.NegativeArraySizeException
- All Implemented Interfaces:
- Serializable
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];
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
NegativeArraySizeException
public NegativeArraySizeException()
- Create an exception without a message.
NegativeArraySizeException
public NegativeArraySizeException(String s)
- Create an exception with a message.
- Parameters:
s
- the message