public char getChar(Object obj)
throws IllegalArgumentException,
IllegalAccessException
Gets the value of a static or instance field of type char. The provided 'obj' is the object to extract the boolean value from (should be null for static fields).
Examples
package com.logicbig.example.field;
import java.lang.reflect.Field;
public class GetCharExample { private char aChar = 'a'; private static char aStaticChar = 'z';
public static void main(String... args) throws NoSuchFieldException, IllegalAccessException { Field field = GetCharExample.class.getDeclaredField("aChar"); char aChar = field.getChar(new GetCharExample()); System.out.println(aChar);