Java source code examples

Java source code samples. Java code examples.

Finds out the substring of a StringBuffer

* * * * * 1 votes

Finds out the substring of a StringBuffer

public class StringBufferExample {
	public static void main(String[] args) {
		StringBuffer buff = new StringBuffer("Hello World");
		String value  = buff.substring(0, 5);

		System.out.println(value);
	}
}

Tags: java.lang

Discuss This Code