Java StringBuilder ensureCapacity() method
ensureCapacity(int minCapacity): ensures that the capacity is at least equal to the specified minimum. Syntax: public void ensureCapacity(int minCapacity) Note: If the current capacity is greater than the argument there will be no change in the current capacity. If the current capacity is less than the argument there will be a change in the current … Read more