Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.nio.FloatBuffer;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        FloatBuffer floatBuffer = FloatBuffer.allocate(10);

        floatBuffer.put(0, 1.23F);

        floatBuffer.rewind();

        float[] floatArray = new float[10];

        floatBuffer.get(floatArray);

        System.out.println(Arrays.toString(floatArray));

    }
}