FloatBuffer.put(float[] src) has the following syntax.
public final FloatBuffer put(float[] src)
In the following code shows how to use FloatBuffer.put(float[] src) method.
/*from w w w .ja v a2 s. com*/ import java.nio.FloatBuffer; import java.util.Arrays; public class Main { public static void main(String[] args) { FloatBuffer floatBuffer = FloatBuffer.allocate(10); floatBuffer.put(new float[]{1.23F}); System.out.println(Arrays.toString(floatBuffer.array())); } }
The code above generates the following result.