Close

Java Reflection - Class.isArray() Examples

Code Snippets Java Reflection Java Java API 


Class:

java.lang.Class

java.lang.Objectjava.lang.Objectjava.lang.Classjava.lang.Classjava.io.SerializableSerializablejava.lang.reflect.GenericDeclarationGenericDeclarationjava.lang.reflect.TypeTypejava.lang.reflect.AnnotatedElementAnnotatedElementLogicBig

Method:

public boolean isArray()
Returns:
true if this object represents an array class; false otherwise.

Examples


package com.logicbig.example.clazz;

public class IsArrayExample {

public static void main(String... args) {
Class<int[]> c = int[].class;
System.out.println(c.isArray());
}
}

Output

true




See Also