这应该演示如何解决它:import java.lang.reflect.Field;class Super { private int i = 5;}public class B extends Super { public static void main(String[] args) throws Exception { B b = new B(); Field[] fs = b.getClass().getSuperclass().getDeclaredFields(); fs[0].setAccessible(true); System.out.println(fs[0].get(b)); }}输出:5