Just to expand on Dirk's very succinct response, what you're describing is an associative array and, as you suspect, there's nothing exactly like that in Java. You can achieve the same functionality by using any of the Collections classes, from java.util, that implement the Map interface (Maps! ). These classes maintain collections of name/value pairs, i.e. associations. Before you read on you may like to try this out for yourself; it's pretty straightforward.
So, using a Map your sample code might look like this:
The cast to (Image) is required as get() returns an Object.