D, a compile error occurs.
if we change "Stream<String> nInSt = iStr.flatMapToInt((x) -> x.stream ());"
to "Stream<String> nInSt = iStr.flatMap((x) -> x.stream ());"
then the output is 1John2null
Compilation error: incompatible types: bad return type in lambda expression
Stream<String> nInSt = iStr.flatMapToInt((x) -> x.stream());
^
Stream<String> cannot be converted to IntStream
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Innovation
Highly Voted 4 years, 6 months agoasdfjhfgjuaDCV
Most Recent 4 months, 4 weeks agosteefaand
5 months, 4 weeks agoShad657
1 year agor1muka5
1 year, 5 months agoYasinGaber
2 years, 5 months agoM_Jawad
4 years, 6 months ago