package com.logicbig.example.field;
import java.lang.reflect.Field;
public class SetCharExample {
private char myChar;
public static void main(String... args) throws NoSuchFieldException, IllegalAccessException {
Field f = SetCharExample.class.getDeclaredField("myChar");
SetCharExample instance = new SetCharExample();
f.setChar(instance, 'z');
System.out.println(f.getChar(instance));
}
}