It creates an empty StringBuffer in which you can put at least 128 characters, without needing to allocate more memory. If you add more than 128 characters it will have to allocate a new, larger internal character buffer.

You are given the option to specify the initial size because in a very tight loop reallocation may degrade performance. Which means that in 99% of the cases you don't need to do it.