Java source code examples

Java source code samples. Java code examples.

Finds the substring of a StringBuffer starting from specified index.

* * * * * 2 votes

Finds the substring of a StringBuffer starting from specified index.

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

		System.out.println(value);
	}
}

Tags: java.lang

Discuss This Code