Java tutorial
public class Main { public static void main(String[] arg) { StringBuffer buffer = new StringBuffer(); char[] chars = new char[] { 'j', 'a', 'v', 'a', '2', 's', '.', 'c', 'o', 'm' }; buffer.append(chars, 1, 3); System.out.println(buffer); } }