When you want a simple key/value table, then the HashMap might be what you are looking for.
Map<String, String> myMap = new HashMap<>(); myMap.put("foo", "bar"); System.out.println(myMap.get("foo")); // outputs "bar"
This example matches Strings to Strings, but you can use HashMaps to map any type to any other type. You can even create a
Map<Object, Object> to create a weakly-typed map which maps anything to anything. But for most use-cases you would rather use a more specialized form.