I understand that string buffer can append data and write it in a text file. But my question is, how big or the size stringbuffer can store data? can it store more than 10000+ data? what about the performance of the system? Or should i create a if-else statement to check the amount of data that i have been append to the stringbuffer before i write it in the text file and clear the stringbuffer before continue to the next record? will this method be a best idea?Does anyone has a GREAT suggestion ?
k_en
0
Light Poster
Recommended Answers
Jump to PostStringBuffer is certainly better in handling lots of operations than a normal String and can handle the same number of characters as a String. It is also completely thread safe.
However if you are using JDK 5 or later, you might want to think about using a StringBuilder if …
All 4 Replies
darkagn
315
Veteran Poster
Featured Poster
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
jwenting
1,889
duckman
Team Colleague
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.