Java IO Tutorial - Java FloatBuffer.hasArray()








Syntax

FloatBuffer.hasArray() has the following syntax.

public final boolean hasArray()

Example

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

import java.nio.FloatBuffer;
/* w ww.  j a v  a2 s . com*/
public class Main {
  public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);
    
    floatBuffer.put(1,1.23F);
    
    System.out.println(floatBuffer.hasArray());

  }
}

The code above generates the following result.