Top "Stringbuffer" questions

StringBuffer in Java is used as a thread-safe, mutable sequence of characters, replaced by StringBuilder in Java 5.0+

Java: StringBuffer & Concatenation

I'm using StringBuffer in Java to concat strings together, like so: StringBuffer str = new StringBuffer(); str.append("string value"); I …

java concatenation stringbuffer
How to Reassign value of StringBuffer?

How can we re assign the value of a StringBuffer or StringBuilder Variable? StringBuffer sb=new StringBuffer("teststr"); Now i …

java string stringbuilder stringbuffer
Why use StringBuilder? StringBuffer can work with multiple thread as well as one thread?

Suppose our application have only one thread. and we are using StringBuffer then what is the problem? I mean if …

java multithreading synchronization stringbuilder stringbuffer
How to convert StringBuffer to InputStream in Java ME?

I'm new in Java and learning Java ME development. I got stuck in this conversion. Please help me to convert …

java java-me inputstream midlet stringbuffer
deleteCharAt or setLength, which way is better to remove last char from a StringBuilder/StringBuffer

In many cases, we need to delete the last char of a StringBuilder/StringBuffer. For example, given a int[]{1,2,3}, to …

java stringbuilder stringbuffer
What is the capacity of a StringBuffer?

When I run this code: StringBuffer name = new StringBuffer("stackoverflow.com"); System.out.println("Length: " + name.length() + ", capacity: " + name.capacity()); …

java stringbuffer
Get the index of the start of a newline in a Stringbuffer

I need to get the starting position of new line when looping through a StringBuffer. Say I have the following …

java stringbuffer
Coding for the first time (Java hangman game)- going from console-based to GUI

I am completely new to programming and I have to complete some tasks in Java (I'm using Eclipse). This one …

java user-interface stringbuffer
What is the complexity of this simple piece of code?

I'm pasting this text from an ebook I have. It says the complexity if O(n2) and also gives an …

java complexity-theory big-o time-complexity stringbuffer
remove html tag in android

I have follows below XML feed: <Description> <p>Touch, tap, flip, slide! You don&#39;t …

java android html xml-parsing stringbuffer