Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StringBuffer? #10

Open
Zordid opened this issue Sep 4, 2015 · 0 comments
Open

StringBuffer? #10

Zordid opened this issue Sep 4, 2015 · 0 comments

Comments

@Zordid
Copy link

Zordid commented Sep 4, 2015

It's a very well known fact, that one should not use StringBuffers.
StringBuffers have a huge overhead for synchronization purposes that are not needed here.
You should replace those with StringBuilders and even consider not using them at all.

If there are no loops, a simple String a = "Hello, "+ b+ "world!" internally uses a StringBuilder by itself without you worrying about it in the first place...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant