package com.logicbig.example.field;
import java.lang.reflect.Field;
public class SetIntExample {
private int myInt;
public static void main(String... args) throws NoSuchFieldException, IllegalAccessException {
Field f = SetIntExample.class.getDeclaredField("myInt");
SetIntExample instance = new SetIntExample();
f.setInt(instance, 5);
System.out.println(f.getInt(instance));
}
}