1234av Casie 5678
1234aw Shel 5762 0998 ---* the unique value should be printed at the side rather than creating the whole set of line again.
1234ax nica 9754
sorry i'm really poor on loops please help me. thanks
and God Bless
ps: i was printing it on a text file
posted 4 years ago
Hm, I'm not sure if there's a better way to do it, but in my opinion, you could use a Map to store the values, so and check if there's a duplicate, if there is, get the value and append the new value to it.
For the key, you could combine both, for example, from the code you've given, 1234aw,Shel. And if you need to use the key, just split it with ",".