Compare two sets of elements are the same?

menuSearches.sort(Comparator.comparing(String::hashCode));

After the first set of elements, the sort, turn into String type, then compared using equals

Guess you like

Origin www.cnblogs.com/qingmuchuanqi48/p/12013966.html