• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why initial size of String Buffer is 16

 
Naresh Shanmugam
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does any body have any concrete idea on why the String Buffer's initial size is of 16 characters and why not 0 characters.

This would internally create a char array of initial size of 16. What is the idea behind "16"
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check Rob's guessing here.
 
Naresh Shanmugam
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your time Christophe
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!