遍历java对象中的属性

public static void Reflect(Object obj) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException{
        Field[] field = obj.getClass().getDeclaredFields();        //获取实体类的所有属性,返回Field数组  
        for(int j=0 ; j

 

你可能感兴趣的:(Java)