title: Java StringBuilder(StringBuffer)'s ensureCapacity(): Why is it doubled and incremented by 2?
body: <p>I have searched about this, but I couldn't find why StringBuilder's <code>ensureCapacity()</code> method won't lengthen the old capacity by just doubling but also adding two.</p>
  
  <p>So, when default capacity of 16 is full, next lengthened value will be 34 unless whole string length doesn't exceed 34. Why shouldn't it be 32?</p>
  
  <p>My best guess is considering for a null character, '\u0000', but I'm not sure. Can anyone tell me why?</p>