Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.nio.ShortBuffer;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        ShortBuffer bb = ShortBuffer.allocate(10);
        bb.put((short) 100);

        bb.rewind();

        short[] shortArray = new short[10];
        bb.get(shortArray);

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

    }
}