stringbuilder tag

4 questions


1 answers
399 views
0
How do I empty or clean the String Builder?

You are using StringBuilder in the loop and want to start with an empty StringBuilder and empty after x iterations.The functionality corresponding to the NET String Builder is not displayed. Only remo...

1 years ago

1 answers
73 views
0
I saw StringBuilder and StringBuffer, but I don't understand

I saw StringBuilder and StringBuffer, but I don't understand What is the difference between the two? Is there a difference in performance?


1 answers
154 views
0
What is the difference between using the StringBuilder class in Java's toString() method and using the string connection operator?

Which of the two toString() methods below is the better one?public String toString(){ return {a:+ a + , b: + b + , c: + c +};}public String toString(){ StringBuilder sb = new StringBuilder(100); retu...


1 answers
101 views
0
How to empty or remove the contents of StringBuilder

I'm using StringBuilder in the repeat. And I'd like to repeat all the x's and empty the contents and write a new String Builder. On dotnet, StringBuilder.ClearJava supports delete but it seems too com...

1 years ago

© 2024 OneMinuteCode. All rights reserved.