> And you can't deduce what you have to do from looking
> at a Singleton example? No good start, don't you
> think?
>
> Have a static List or array, initialized with five
> instances. Done.
If List (or Set), also make it [url=http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html#unmodifiableList(java.util.List)]unmodifiable[/url].
> If List (or Set), also make it
> [url=http://java.sun.com/j2se/1.4.2/docs/api/java/util
> /Collections.html#unmodifiableList(java.util.List)]unm
> odifiable[/url].
Not necessarily necessary. :) As long as the class doesn't modify it and he never provides a reference to that list to anyone else, it should be okay.