如果list<User>为集合 1.增强for的方式 for (User user : list) { System.out.println(user); } 2.普通for的方式 for(int i=0