8000 update · githubcs/Java-Coding-Problems@829b8f1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 829b8f1

Browse files
committed
update
1 parent 3a7d00c commit 829b8f1

File tree

1 file changed

+2
-2
lines changed
  • Chapter_01/P02_FirstNonRepeatedCharacter/src/modern/challenge

1 file changed

+2
-2
lines changed

Chapter_01/P02_FirstNonRepeatedCharacter/src/modern/challenge/Strings.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public static char firstNonRepeatedCharacterV4(String str) {
106106
}
107107

108108
Map<Integer, Long> chs 868B = str.chars()
109-
.boxed()
109+
.mapToObj(c -> c)
110110
.collect(Collectors.groupingBy(Function.identity(),
111111
LinkedHashMap::new, Collectors.counting()));
112112

@@ -125,7 +125,7 @@ public static String firstNonRepeatedCharacterVCP4(String str) {
125125
}
126126

127127
Map<Integer, Long> chs = str.codePoints()
128-
.boxed()
128+
.mapToObj(c -> c)
129129
.collect(Collectors.groupingBy(Function.identity(),
130130
LinkedHashMap::new, Collectors.counting()));
131131

0 commit comments

Comments
 (0)
0