int count = Collections.frequency(list, key); java的内置方法 转载于:https://www.cnblogs.com/wysAC666/p/10252676.html