In this tutorial you will see how to get given index value from FloatBuffer in java.
In this tutorial you will see how to get given index value from FloatBuffer in java.In this tutorial, we will discuss how to get given index value from FloatBuffer in java.
FloatBuffer API:
The java.nio.FloatBuffer class extends java.nio.Buffer class. It provides the following methods:
Return type | Method | Description |
static FloatBuffer | allocate( int capacity) | The allocate(...) method create a new float buffer of given capacity. |
abstract float | get() | The get(...) method returns float value at current position and increment the position by 1. |
abstract float | get(int index) | The get(...) method returns float value at given index. |
import java.nio.*;
|
C:\>java
IndexValueDemo All values in float buffer. 4.2 5.1 6.4 Value in float buffer at given index. 5.1 |