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.

When did Strings start caching their hash codes?

caching hash strings
0
10 Posted

When did Strings start caching their hash codes?

0
10

Location: http://www.jguru.com/faq/view.jsp?EID=289946 Created: Dec 30, 2000 Modified: 2000-12-30 19:27:02.099 Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7) Starting with the 1.3 release of Java, the java.lang.String class will only calculate the hashcode once, when its first needed. Future calls to hashCode() will return the previously calculated value.

Related Questions

What is your question?

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

Experts123