Java FloatBuffer.get(int index)
Syntax
FloatBuffer.get(int index) has the following syntax.
public abstract float get(int index)
Example
In the following code shows how to use FloatBuffer.get(int index) method.
import java.nio.FloatBuffer;
//from w ww .j a v a2s . 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.get(0));
}
}
The code above generates the following result.