This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Why initial size of String Buffer is 16 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Why initial size of String Buffer is 16" Watch "Why initial size of String Buffer is 16" New topic
Author

Why initial size of String Buffer is 16

Naresh Shanmugam
Ranch Hand

Joined: Jul 16, 2010
Posts: 84
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

Check Rob's guessing here.


[My Blog]
All roads lead to JavaRanch
Naresh Shanmugam
Ranch Hand

Joined: Jul 16, 2010
Posts: 84
Thanks for your time Christophe
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why initial size of String Buffer is 16
 
Similar Threads
StringBuffer length
What is the initial capacity of the following string buffer?
stringbuffers
Why StringBuffer size is 16 charectors in java...?
StringBuffer doubt