我正在尝试对名为的 ArrayList 执行以下流操作parts:
parts
.stream()
.map(t -> t.toLowerCase())
.distinct()
.sorted()
.collect(Collectors.toList());
其中parts包含这样的字符串:
Adventures
in
Disneyland
Two
blondes
were
going
to
Disneyland
....
除了查看调试器外,parts根本没有改变。不确定我是否遗漏了该过程的某些步骤?
慕容708150
HUX布斯
喵喵时光机
白猪掌柜的
相关分类