Say i have this class
public static final class MyClass {
public static final int A = 4 ;
public static final int[] B = { 1, 2, 3, 4 };
}
I have to access above class and its field values through reflections
Class<?> myClass = getDesiredClass("MyClass");
I am able to get the value of A by this
int a = myClass.getField("A").getInt(myClass);
But how to get value of B, what methods of Field should i use?
int[] b = myClass.getField("B").?