I have to store data from a UDP packet such as name, address and port number. I originally used 3 array lists to do this but this seems like too much trouble.
Instead I thought of using Hashmap for the key – value line up it is but this would mean that the names would be contained in their own hash map or array list.
Is there a good, efficient way of storing all this data in the one collection/container/array?
Try to use something like this :
And then use :