文章目录 遇到问题解决方法参考 遇到问题 项目有需求:java把List转换为String,用于后续匹配。 解决方法 String guess = word.stream() .map(character -> character.toString()) .reduce("", String::concat); result [f, a, v, o, r] guess is: favor 参考 https://stackoverflow.com/questions/24882927/using-streams-to-convert-a-list-of-objects-into-a-string-obtained-from-the-tostr