Java 遍历list的写法 2021年10月29日 / //遍历集合写法一 for(Object o:categoryList){ CategoryEntity c = (CategoryEntity)o; } //遍历集合写法二 for(int i=0;i<list.size();i++){ CategoryEntity c = list.get(i); }