Array.newInstance() | Java

 

Descripción

Sintaxis

public static Object newInstance(Class<?> componentType, int length) throws NegativeArraySizeException
public static Object newInstance(Class<?> componentType, int... dimensions) throws IllegalArgumentException, NegativeArraySizeException

Parámetros

  • int… dimensions,
  • int length,
  • Class<?> componentType,

Excepciones

NegativeArraySizeException, IllegalArgumentException, NullPointerException

Clase Padre

Array

Ejemplo


Líneas de Código

    Manual Java

    Aprende más sobre Java consultando online o descargando nuestro manual.

    Test Java

    ¿Te atreves a probar tus habilidades y conocimiento en Java con nuestro test?

    Vídeos Java

    Disfruta también de nuestros artículos sobre Java en formato vídeo. Aprovecha y suscribete a nuestro canal.