Beware the array "solution". It can be made to work, but its as un-Java as you can imagine. Youcan stuff anything into an array of Objects, but then you have to do unchecked casts to get them back and use them. There's no opportunity to hide the data behind a set of accessors/mutators, so it fundamentally violates the OO principle of hiding the data/implementation. It's horrible.
Creating a class is the standard way to go.
Your example (Image and name) suggests that maybe you will want to access the image via its name? In which case, have a look at the HashMap class
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073