// Java: String shortest = items.stream() .min(Comparator.comparing(item -> item.length())) .get();
// 科特林: val shortest =items.minBy{it.length}