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