Tag: java trim to size

trimToSize() StringBuffer Example

December 5, 2014 · 1 min read
When the coding comes to an end with string manipulation in the buffer and further no modification is required, keeping extra buffer is memory waste. To remove the extra buffer than required to hold the characters, Programmer calls this method.