Try to studying Stream API. So, I have a list of strings like this:
118.111.97.113
119.122.122.122
122.122.122.97
122.122.122.99
122.122.122.100
I need to split it by '.' and separate numbers put as separate value to new collection.
Like this:
118
111
97
113
119
...
I know about flatMap method, that can assume one value and return several, but how use it correctly, have no one idea. Can you help me or give some ideas?
Thanks!
flatMapas squeezing a fruit with seeds, you get one fruit as input and lots of seeds as output