0

My array:

private Object[] arr = new Pair[initialCapacity];

My Pair class:

private static class Pair<V> {
    private String key;
    private V value;

    public Pair(String key, V value) {
        this.key = key;
        this.value = value;
    }
}

I'm trying to get the properties of the objects like this:

arr[startPos].key

but I get the error "cannot find symbol - variable key"

Wiggiwoo
  • 1
  • 1

0 Answers0