February 2014
Beginner
1248 pages
62h 25m
English
• Stream method sorted (p. 748) can receive a Comparator as an argument to specify how to compare stream elements for sorting.
• By default, method sorted uses the natural order for the stream’s element type.
• For Strings, the natural order is case sensitive, which means that "Z" is less than "a". Passing the predefined Comparator String.CASE_INSENSITIVE_ORDER performs a case-insensitive sort.
Read now
Unlock full access