I've got a LinkedHashMap that contains an object at key
and one at value
.
I've used the code
yourShots.keySet().toArray()[yourShots.size()-1]
to return the last object of the keys
. However, I am unable to access a method that the object has.
I've used the getClass()
method to determine that I do indeed have the right kind of object, but the method cannot be called. I simply get the error that the method cannot be found.
Am I doing something wrong?