1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-20 22:17:09 +08:00

Merge pull request #2295 from Gemaxis/main

Fix code error
This commit is contained in:
Guide 2024-03-02 20:09:18 +08:00 committed by GitHub
commit 955c82756d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -627,7 +627,7 @@ public class MapAndFlatMapExample {
.collect(Collectors.toList());
System.out.println("Using map:");
System.out.println(mapResult);
mapResult.forEach(arrays-> System.out.println(Arrays.toString(arrays)));
List<String> flatMapResult = listOfArrays.stream()
.flatMap(array -> Arrays.stream(array).map(String::toUpperCase))