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