builder tag

6 questions


1 answers
412 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...

2 years ago

1 answers
84 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
178 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
111 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
112 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...

2 years ago

1 answers
122 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?

2 years ago

© 2024 OneMinuteCode. All rights reserved.