Name

NegativeArraySizeException

Synopsis

Signals an attempt to allocate an array with fewer than zero elements.

java.lang.NegativeArraySizeException

Figure 10-40. java.lang.NegativeArraySizeException

public class NegativeArraySizeException extends RuntimeException {
// Public Constructors
     public NegativeArraySizeException( );  
     public NegativeArraySizeException(String s);  
}

Thrown By

java.lang.reflect.Array.newInstance( )

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.