Uses of Class java.lang.NegativeArraySizeException (Java Platform SE 8 )
Date: 2026-04-17

## Uses of Class
java.lang.NegativeArraySizeException

- Packages that use NegativeArraySizeException
  Package | Description
  --- | ---
  java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.

- - ### Uses of NegativeArraySizeException in java.lang.reflect

    Methods in java.lang.reflect that throw NegativeArraySizeException
    Modifier and Type | Method and Description
    --- | ---
    `static Object` | Array.`newInstance(Class<?> componentType, int... dimensions)` Creates a new array with the specified component type and dimensions.
    `static Object` | Array.`newInstance(Class<?> componentType, int length)` Creates a new array with the specified component type and length.

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.