Both calls are correct:
Collectors.groupingBy((String s)->s.toLowerCase(),Collectors.counting()); Collectors.groupingBy((String s)->s.toLowerCase(Locale.ENG