builder tag

6 questions


1 answers
401 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
75 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
165 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
98 views
0
How to add a button to the Android Alert Dialog

I made AlertDialog using a builder for the activity, but I want to put a button in itOkay, or whatever, you do something when the button is pressed Not the yes or no button by default. How can we do t...


1 answers
102 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

1 answers
110 views
0
Why do you use builder in Java?

When you create an object, you use a Builder pattern instead of a constructor. Why do you use this?

1 years ago

© 2024 OneMinuteCode. All rights reserved.