The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
June 2000

Advertisement

Advertisement

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 Artima Forums.

Message:

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
system.

Thanks again but I'm not fixed yet.
Eric


> 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.
> Cheers
> Vivek






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us