Hi
The articles quoted by KevinWorkman seems to be easy to understand.
Don’t load everything at startup or the bigger your program is, the longer it takes to start. It’s ok if it remains tiny. Otherwise, you should load an image only when you really need it and you should keep it during a certain amount of time in order to avoid reloading it each time except when you risk to run out of memory. You can split the whole life of your software from the start to the end into cycles, maybe you don’t need everything always. For example, as we are on Java-Gaming.org, when you enter the level 11, you don’t need to keep the sprites of the bad guys located in the level 1, do you? Another strategy consists in using a kind of reference able to “drop” the referenced object(s) when you risk to run out of Java memory, you can look at weak references (but keep in mind that WeakHashMap uses weak keys, not weak values, i.e it’s a bad candidate for caching).
It’s important to know how to identify a resource, in order to retrieve it further. You can use the path of the image file to identify an image, it’s more flexible than creating a static field in a class each time you want to use a new image but you can still do it to store the relative path of the entity image.
Maybe the advises above are a bit too much for your use case, it’s up to you. Good luck.