I have the following input and I would like them to be grouped using the empty line as the logical divider.
input datatype:
List<String>
line1
line2
line3
line4
line5
line6
line7
line8
expected output: type: List<List>
{{line1, line2, line3}, {line4, line5, line6}, {line7, line8}}
While this is trivial using imperative programming, I am looking for a solution that uses functional programming in Java.