There are three possible ways, but apparently the best one is to call setLength(0)
on the StringBuilder object.
StringBuilder strBuilder = new StringBuilder();
// code that appends to strBuilder
strBuilder.setLength(0);
References
Yet another developer blog …
There are three possible ways, but apparently the best one is to call setLength(0)
on the StringBuilder object.
StringBuilder strBuilder = new StringBuilder();
// code that appends to strBuilder
strBuilder.setLength(0);
References