java.lang.String#intern() is an interesting function in Java. When used in the right place, it has the potential to reduce the overall memory consumption of your application by eliminating duplicate strings in your application. To learn how the intern() function works, you may refer to this blog. In this post let’s discuss the performance impact of using java.lang.String#intern() function in your application.

Intern() Function Demo

To study the performance behaviour of the intern() method, we created these two simple programs:

Source de l’article sur DZONE

L’assistance proposée par ANKAA PMO

ANKAA PMO présent depuis plus de 20 ans sur le marché des services IT, accompagne les DSI dans leur recherche de compétences pour des besoins de renforts en mode régie ou l’externalisation de projets.
Vous souhaitez plus d’information ? Cliquez ici