Java optimized string and character array
•
Java
In my program, I'm doing a lot of string operations I'm trying to improve performance and wonder if using char arrays will show a good performance improvement Any suggestions?
Solution
What are you doing? Can you publish a code example?
You might want to see StringBuilder, which implements charsequence to improve performance I'm not sure you want to get out of here StringBuilder is not thread safe btw... If you want thread safe, look at StringBuffer
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码