I am stuck here:
my input file:
123 456 789
872 727 282
123 838 831
818 833 939
Now, I need to save data in a hashmap, 2d array or any best possible alternative like this:
key value
123 -> 456, 789, 838, 831
872 -> 727, 282
818 -> 833, 939
What is the best possible way (simple and optimized) to achieve this and using what?
I am trying Map<String, List> rawData = new HashMap<String, List>();
but with no success.
I am new to java. :)