samedi 21 mai 2016

Does Java implemented Flyweight design pattern with Strings?

As per the GOF definition for "Flyweight", reuse\share similar kind of objects to reduce the memory growth.

If this is the case, java string object does the same right by using string constant pool. Then can we say that, Java String implements the Flyweight design pattern? If no why?

Aucun commentaire:

Enregistrer un commentaire