Java tutorial
import java.nio.IntBuffer; import java.util.Arrays; public class Main { public static void main(String[] args) { IntBuffer bb = IntBuffer.wrap(new int[] { 0, 1, 2, 3, 4, 5, 6 }, 0, 3); bb.put(100); System.out.println(Arrays.toString(bb.array())); } }