Question: I am fairly new in Java, so I have to rely on this community for this one. 

I need to store an object in some sort of array/list where I can quickly access the object using a string and two interger keys. Something like `a["string"][1][1]` - I have looked over some different guides and tutorials, but not been able to come up with a good solution that's easy to manage.

I am creating a Minecraft plugin where I need to keep track of where specific Blocks are with `world`, `chunk_x`, and `chunk_z`- I am trying to create a method where I can provide a location, which has the three beforementioned values, and do a quick look up based on the world and chunk, so I do not have to iterate all stored blocks in the world, but can limit it to 9 chunks of the world. (Current chunk i am in and all surrounding neighbours)

Answer: 
Does it have to be a multidimensional array? You could use just a hash map with a custom key that holds your string key and the two integer keys. Here is a complete example of what I mean:

```
import java.util.HashMap;
import java.util.Objects;

public class multidim {
    static class Key {
        int index0, index1;
        String str;
        int _hash_code;

        public Key(String s, int i0, int i1) {
            _hash_code = Objects.hash(s, i0, i1);
            str = s;
            index0 = i0;
            index1 = i1;
        }

        public int hashCode() {
            return _hash_code;
        }

        public boolean equals(Object x) {
            if (this == x) {
                return true;
            } else if (x == null) {
                return false;
            } else if (!(x instanceof Key)) {
                return false;
            }
            Key k = (Key)x;
            return (index0 == k.index0)
                && (index1 == k.index1)
                && Objects.equals(str, k.str);
        }
    }

    public static void main(String[] args) {
        HashMap<Key, Double> m = new HashMap<Key, Double>();
        m.put(new Key("mjao", 3, 4), 119.0);
        m.put(new Key("katt$k1t", 4, 6), 120.0);

        System.out.println("Value that we put before: "
            + m.get(new Key("mjao", 3, 4)));
    }
}

```

We define a class `Key` that represents the values you use to access elements and we override its `equals` and `hashCode` methods so that it can be used in a hash map. Then we just use it with the `java.util.HashMap` class. Running the above program will output `Value that we put before: 119.0`.

**Edit**: Add `this == x` comparison in `equals` (a small optimization).
What about combination of Map and [Pair](https://www.javatuples.org/index.html)?

```
Map<String, Pair<Integer, Integer>> tripletMap = new HashMap<>;

tripletMap.put(Pair.with(23, 1););

```

You can access values from your triplet as any map and then retrieved `Pair` as:

```
Pair<Integer, Integer> myPair = tripletMap.get("key")
myPair.getValue0()
myPair.getValue1()

```