for singleton design pattern(gang of four), given a singleton instance is only 1 copy in memory, how is this different to a java class with all fields/methods static and with a private constructor. i.e. why is that singleton design pattern neccesary? If i make a java class with all fields/methods/static and a private constructor, it does the same thing as the singleton instance.
Aucun commentaire:
Enregistrer un commentaire