Java IO Tutorial - Java LongBuffer.hasArray()








Syntax

LongBuffer.hasArray() has the following syntax.

public final boolean hasArray()

Example

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

import java.nio.LongBuffer;
/*w w w  .ja va2 s.  c  om*/
public class Main {
  public static void main(String[] args) {
    LongBuffer bb = LongBuffer.allocate(10);
    bb.put(100);
    System.out.println(bb.hasArray());

  }
}

The code above generates the following result.