Sunday, April 20th, 2008 Posted in java.lang | No Comments »
Deletes a substring from a StringBuffer public class StringBufferExample { public static void main(String[] args) { StringBuffer buff = new StringBuffer("Hello World"); buff.delete(0, 5); System.out.println(buff); } } Read more..Sunday, April 20th, 2008 Posted in java.lang | No Comments »
Appends a String to the ends of a StringBuffer public class StringBufferExample { public static void main(String[] args) { StringBuffer buff = new StringBuffer("Hello"); buff.append("World"); System.out.println(buff); } } Read more..Sunday, April 20th, 2008 Posted in java.lang | No Comments »
Replaces a character of a StringBuffer public class StringBufferExample { public static void main(String[] args) { StringBuffer buff = new StringBuffer("Hello World"); buff.setCharAt(1, 'E'); System.out.println(buff); } } Read more..Sunday, April 20th, 2008 Posted in java.lang | No Comments »
Copy the characters of a StringBuffer to a characters array public class StringBufferExample { public static void main(String[] args) { StringBuffer buff = new StringBuffer("Hello World"); char value[] = new char[5]; buff.getChars(0, 5, value, 0); System.out.println(new ... Read more..Sunday, April 20th, 2008 Posted in java.lang | No Comments »
Finds the character at a given position of a StringBuffer. public class StringBufferExample { public static void main(String[] args) { StringBuffer buff = new StringBuffer("Hello World"); char value = buff.charAt(4); System.out.println(value); } } Read more..Sunday, April 20th, 2008 Posted in java.lang | No Comments »
public class StringBufferExample { public static void main(String[] args) { StringBuffer buff = new StringBuffer("Hello World"); buff.setLength(15); int value = buff.length(); System.out.println(value); } } Read more..Sunday, April 20th, 2008 Posted in java.lang | No Comments »
public class StringBufferExample { public static void main(String[] args) { StringBuffer buff = new StringBuffer("Hello World"); buff.setLength(15); int value = buff.length(); System.out.println(value); } } Read more..Sunday, April 20th, 2008 Posted in java.lang | No Comments »
public class StringBufferExample { public static void main(String[] args) { StringBuffer buff = new StringBuffer(100); buff.append("Hello World"); buff.trimToSize(); int value = buff.capacity(); System.out.println(value); } } Read more..Sunday, April 20th, 2008 Posted in java.lang | No Comments »
public class StringBufferExample { public static void main(String[] args) { StringBuffer buff = new StringBuffer(100); buff.append("Hello World"); int value = buff.capacity(); System.out.println(value); } } Read more..Sunday, April 20th, 2008 Posted in java.lang | No Comments »
public class StringBufferExample { public static void main(String[] args) { StringBuffer buff = new StringBuffer("Hello World"); int length = buff.length(); System.out.println(length); } } Read more..