HOME      BLOG       FORUMS      CONTACT       ABOUT

Deletes a substring from a StringBuffer

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..

Appends a String to the ends of a StringBuffer

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..

Replaces a character of a StringBuffer

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..

Copy the characters of a StringBuffer to a characters array

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..

Finds the character at a given position of a StringBuffer.

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..

Sets the length of a StringBuffer

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..

Sets the length of a StringBuffer

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..

Trims the StringBuffer capacity to its size.

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..

Finds out the capacity of a StringBuffer

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..

Finds out the length of a StringBuffer

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..