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];
NegativeArraySizeException
public NegativeArraySizeException()
- Create an exception without a message.
NegativeArraySizeException
public NegativeArraySizeException(String s)
- Create an exception with a message.
- Parameters:
s
- the message