Hello everyone I am a beginner with Java.
I have created a multimap with below data and I want to sort the multimap in a specific way.
Key Values
Basket1 apple_green
mango_red
Basket2 orange_orange
mango_green
basket100 apple_red
orange_green
I want to sort the above multimap in depending on the similarities in the values. The string in values can be any thing, so the code must be able to find the similarity and group them togather. something like this.
basket1 apple_green
basket100 apple_red
basket1 mango_red
basket2 mango_green