Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Re[2]: Is there really a performance benefit using the intern and == operator ?

0
Posted

Re[2]: Is there really a performance benefit using the intern and == operator ?

0

Author: pete hawdon (http://www.jguru.com/guru/viewbio.jsp?EID=1329721), Feb 28, 2007According to the javadoc for String -When the intern method is invoked, if the pool already contains a string equal to this String object as determined by the {@link #equals(Object)} method, then the string from the pool is returned. Otherwise, this String object is added to the pool and a reference to this String object is returned.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123