Java - making objects with key/value pairs?

Viewed 34536

I want to make the following types of objects. This is my higher-level desire that I'd like to figure out in Java:

ListObject(key, String): every key corresponds to a String value; key is a string itself

ListObject(key, String[]): every key corresponds to an array of Strings; key is a string itself

ListObject(key, String, String[]): same deal but with two value fields per key.

How would I make (and use!) objects of this type?

Thanks.

5 Answers
Related