List<String> entries = new ArrayList<>(); entries = entries.stream().sorted().collect(Collectors.toList());