最常用的便是for循环查询:
for(StudentRecord record : records) { if(record.getYear() == yearSearch) { System.out.println(record.getId()+" " + record.getFirst()+ " "+ record.getLast() + "+record.getYear()); count++; } }
参考:https://www.coder.work/article/6150618
标签:java,System,查询,record,getYear,列表 From: https://www.cnblogs.com/2008nmj/p/17192905.html