This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
StringBuffer cannot be empty
Posted by Eric Allan Lucas on June 21, 2000 at 7:46 PM
I very much appreciate your answer. I tried the example and it
does exactly what you say. Unfortunately, I need a string which
is initialized to contain ascii spaces. Sometimes hundreds of
them. These will be concatenated (appended in java-speak)
to form a fixed length record for transmission to another
Thanks again but I'm not fixed yet.
> There is a constructor in StingBuffer class which takes interger value as its parameter.
> Heres the signature and explanation:
> StringBuffer(int length)
> Constructs a string buffer with no characters in it and an initial capacity specified by the length argument.
> Hope this solve yout problem.