Java IO Tutorial - Java IntBuffer.hasArray()








Syntax

IntBuffer.hasArray() has the following syntax.

public final boolean hasArray()

Example

In the following code shows how to use IntBuffer.hasArray() method.

import java.nio.IntBuffer;
//from  ww  w.  ja v a2  s .  co m
public class Main {
  public static void main(String[] args) {
    IntBuffer bb = IntBuffer.allocate(10);
    bb.put(100);
    System.out.println(bb.hasArray());

  }
}

The code above generates the following result.