Item 42: Prefer lambdas to anonymous classes (lambda表达式优于匿名类)
从匿名类到lambdaCollections.sort(words,newComparator(){publicintcompare(Strings1,Strings2){returnInteger.compare(s1.length(),s2.length())}})Collections.sort(words,(s1,s2)->Integer.compare(s1.length(),s2.le