-
January 19th, 2023, 08:51 AM
#1
StringBuffer with a fixed length in Java
Which is the best way to keep a stringbuffer length constant in Java? That is, if the fixed value is 10 and the stringbuffer contains ABCDEFGHIJ, appending K will clear A, resulting in BCDEFGHIJK. I'm considering combining StringBuffer's reverse() and setLength() methods, but I'm not sure how well it will work at 100 K length.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|