What will be the output of the following code? -------------------- public static void main(String[] args) { List<String> list = Arrays.asList("one", "two", "three"); String result = list.stream().reduce((s1, s2) -> String.valueOf(s1.length())).get(); System.out.println(Integer.parseInt(result)); }
Geekific
What will be the output of the following code?
--------------------
public static void main(String[] args) {
List<String> list = Arrays.asList("one", "two", "three");
String result = list.stream().reduce((s1, s2) -> String.valueOf(s1.length())).get();
System.out.println(Integer.parseInt(result));
}
1 month ago | [YT] | 1