In this tutorial you will see how write a float value into float buffer at given index.
In this tutorial you will see how write a float value into float buffer at given index.In this tutorial, we will see how to write the given float value into float buffer at the given index.
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 allocate a new float buffer. |
abstract FloatBuffer | put(int index, float f) | The put(..) method write the given float value into associated buffer at given index. |
abstract float | get(int index) | The get(...) method returns float value at given index. |
import java.nio.*;
|
C:\>java PutIndexValue Store value at index : 3 22.45 |