I need to store information about two attributes of an instance and there could be more than one of them.
So, essentially, I need to store information about two attributes for a set of objects. Which data structure should I be using? I’m using Java. Also, of the two attributes, one is a string and the other is an object.
You can define an Helper class like
and then based on the need you could store them in Map, List or Set or something..