.
Size: a a a
.
А
VP
TreeMap<String, String> map = new TreeMap<>();Почему последний вызов putAll приводит к ошибки компиляции?
List<String> list = new ArrayList<>();
list.add("");
TreeMap<String, String> collect = list.stream()
.collect(Collectors.toMap(
o-> o,
o -> o,
(s, s2) -> {throw new RuntimeException();},
TreeMap::new));
map.putAll(collect);
map.putAll(list.stream()
.collect(Collectors.toMap(
o-> o,
o -> o,
(s, s2) -> {throw new RuntimeException();},
TreeMap::new)));
AE
TreeMap<String, String> map = new TreeMap<>();Почему последний вызов putAll приводит к ошибки компиляции?
List<String> list = new ArrayList<>();
list.add("");
TreeMap<String, String> collect = list.stream()
.collect(Collectors.toMap(
o-> o,
o -> o,
(s, s2) -> {throw new RuntimeException();},
TreeMap::new));
map.putAll(collect);
map.putAll(list.stream()
.collect(Collectors.toMap(
o-> o,
o -> o,
(s, s2) -> {throw new RuntimeException();},
TreeMap::new)));
VP
EN
TreeMap<String, String> map = new TreeMap<>();Почему последний вызов putAll приводит к ошибки компиляции?
List<String> list = new ArrayList<>();
list.add("");
TreeMap<String, String> collect = list.stream()
.collect(Collectors.toMap(
o-> o,
o -> o,
(s, s2) -> {throw new RuntimeException();},
TreeMap::new));
map.putAll(collect);
map.putAll(list.stream()
.collect(Collectors.toMap(
o-> o,
o -> o,
(s, s2) -> {throw new RuntimeException();},
TreeMap::new)));
map.putAll(list.stream()
.collect(Collectors.<String, String, String, TreeMap<String, String>>toMap( ...S
.
А
A
U
U
U
e
U
e
U
U
VP