Skip to content

Latest commit

 

History

History
executable file
·
11 lines (6 loc) · 582 Bytes

fe94.md

File metadata and controls

executable file
·
11 lines (6 loc) · 582 Bytes

Back to questions

Solution to fe94: Using Stream.map and Stream.filter

See code at solutions/code/tutorialquestions/questionfe94

Compare your solution to the sample answer.

In reverseEachString, note the syntax StringBuilder::new for mapping the constructor of StringBuilder that takes a String argument over a stream of Strings to get a stream of StringBuilders.

Think about the differences in readability between the standard and monolithic versions you have implemented, and whether you have a preference.