Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java 8 lambda comparator


    Comparator<Developer> byName = new Comparator<Developer>() {
        @Override
        public int compare(Developer o1, Developer o2) {
            return o1.getName().compareTo(o2.getName());
        }
    };
Source by mkyong.com #
 
PREVIOUS NEXT
Tagged: #java #lambda #comparator
ADD COMMENT
Topic
Name
7+9 =