回答編集履歴

4

メソッドつづりミス

2017/07/21 05:22

投稿

swordone
swordone

スコア20651

test CHANGED
@@ -6,6 +6,6 @@
6
6
 
7
7
  Map<String, Long> map = Stream.of(target.toLowerCase().split("[.,]?\\s+"))
8
8
 
9
- .collect(Collectors.groupintBy(w -> w, Collectors.counting()));
9
+ .collect(Collectors.groupingBy(w -> w, Collectors.counting()));
10
10
 
11
11
  ```

3

閉じカッコの場所間違い

2017/07/21 05:22

投稿

swordone
swordone

スコア20651

test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ```java
6
6
 
7
- Map<String, Long> map = Stream.of(target.toLowerCase()).split("[.,]?\\s+")
7
+ Map<String, Long> map = Stream.of(target.toLowerCase().split("[.,]?\\s+"))
8
8
 
9
9
  .collect(Collectors.groupintBy(w -> w, Collectors.counting()));
10
10
 

2

閉じカッコの不足

2017/07/21 03:00

投稿

swordone
swordone

スコア20651

test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ```java
6
6
 
7
- Map<String, Long> map = Stream.of(target.toLowerCase().split("[.,]?\\s+")
7
+ Map<String, Long> map = Stream.of(target.toLowerCase()).split("[.,]?\\s+")
8
8
 
9
9
  .collect(Collectors.groupintBy(w -> w, Collectors.counting()));
10
10
 

1

collectメソッドの引数修正

2017/07/21 02:59

投稿

swordone
swordone

スコア20651

test CHANGED
@@ -6,6 +6,6 @@
6
6
 
7
7
  Map<String, Long> map = Stream.of(target.toLowerCase().split("[.,]?\\s+")
8
8
 
9
- .collect(w -> w, Collectors.counting());
9
+ .collect(Collectors.groupintBy(w -> w, Collectors.counting()));
10
10
 
11
11
  ```