for (Field f : Object.getClass().getDeclaredFields()) {
f.setAccessible(true);
System.out.print(f.getName() + ":"); //key
System.out.println(f.get(Object)); //value
}
for (Field f : Object.getClass().getDeclaredFields()) {
f.setAccessible(true);
System.out.print(f.getName() + ":"); //key
System.out.println(f.get(Object)); //value
}
评论 (0)