stringbuffer
Create a string with n characters
Is there a way in Java t开发者_如何转开发o create a string with a specified number of a specified character? In my case, I would need to create a string with ten spaces. My current code is:[详细]
2022-12-30 06:45 分类:问答What's a good way of building up a String given specific start and end locations?
(java 1.5) I have a need to build up a String, in 开发者_JAVA百科pieces.I\'m given a set of (sub)strings, each with a start and end point of where they belong in the final string.Was wondering if the[详细]
2022-12-27 16:43 分类:问答How to Reassign value of StringBuffer?
How can we re assign the value of a StringBuffer or StringBuilder Variable? StringBuffer sb=new StringBuffer(\"teststr\");[详细]
2022-12-26 03:33 分类:问答What is the difference between String and StringBuffer in Java?
What is开发者_如何学运维 the difference between String and StringBuffer in Java? Is there a maximum size for String?String is used to manipulate character strings that cannot be changed (read-only an[详细]
2022-12-23 00:24 分类:问答Adding an Object to Vector loses Reference using Java?
I have a Vector that holds a number of objects. My code uses a loop to add objects to the Vector depending on certain conditions. My question is, when I add the object to the Vector, is the original o[详细]
2022-12-22 16:57 分类:问答Does the StringBuffer equals method compare content? [duplicate]
This ques开发者_Python百科tion already has answers here: Closed 12 years ago. Possible Duplicate: Comparing StringBuffer content with equals[详细]
2022-12-18 19:09 分类:问答New Object Creation in recursive Java program
Java newbie here looking for some help. Here is the code in question: public void generateCodeTable(Node tree, StringBuffer buf) {[详细]
2022-12-18 03:43 分类:问答Strings are immutable - that means I should never use += and only StringBuffer?
Strings are immutable, meaning, once they have been created they cannot be changed. So, does this mean that it would take more memory if you append things with += than if you create开发者_开发知识库d[详细]
2022-12-10 09:46 分类:问答