Skip to content
Advertisement

What would be the most concise way to write below snippet in Java? [closed]

JavaScript

props is Map<String, List>

currently am writing it this way:

JavaScript

is this correct? can it be better?

Advertisement

Answer

Try this.

JavaScript

test case:

JavaScript

result:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement