Java FloatBuffer.arrayOffset()
Syntax
FloatBuffer.arrayOffset() has the following syntax.
public final int arrayOffset()
Example
In the following code shows how to use FloatBuffer.arrayOffset() method.
import java.nio.FloatBuffer;
// ww w .jav a2 s . c om
public class Main {
public static void main(String[] args) {
FloatBuffer floatBuffer = FloatBuffer.allocate(10);
floatBuffer.put(0,1.23F);
floatBuffer.rewind();
System.out.println(floatBuffer.arrayOffset());
}
}
The code above generates the following result.