标签:getc declared 遍历 getname row declare tac ble access
public static void main(String[] args) throws IllegalArgumentException, IllegalAccessException {
// TODO Auto-generated method stub
Person p=new Person(3,"阿三");
for (Field field :p.getClass().getDeclaredFields()) {
field.setAccessible(true);
System.out.println(field.getName() + ":" +field.get(p));
}
}
标签:getc declared 遍历 getname row declare tac ble access
原文地址:http://www.cnblogs.com/yuezeyuan/p/7597680.html