package com.logicbig.example.field;
import java.lang.reflect.Field;
public class SetShortExample {
private short myShort;
public static void main(String... args) throws NoSuchFieldException, IllegalAccessException {
Field f = SetShortExample.class.getDeclaredField("myShort");
SetShortExample instance = new SetShortExample();
short s = 5;
f.setShort(instance, s);
System.out.println(f.getShort(instance));
}
}