import java.nio.*; import java.nio.IntBuffer; public class WrapIntBuffer{ public static void main(String[] args) throws Exception { int[] array = new int[] { 3, 2, 5, 6 }; IntBuffer IntBuf = IntBuffer.wrap(array); System.out.println("\nContent of int buffer."); while (IntBuf.hasRemaining()) { System.out.println(IntBuf.get()); } System.out.println("Position of IntBuffer : " + IntBuf.position()); System.out.println("Limit of IntBuffer : " + IntBuf.limit()); System.out.println("Capacity of IntBuffer : " + IntBuf.capacity()); } }