main.java

来自「java的经典例子」· Java 代码 · 共 25 行

JAVA
25
字号
import java.lang.reflect.*;

class Main {
    public static void main(String[] args) {
        byte[] bytes = new byte[1];
        char[] chars = new char[1];
        short[] shorts = new short[1];
        int[] ints = new int[1];
        long[] longs = new long[1];
        float[] floats = new float[1];
        double[] doubles = new double[1];

        // The set of array types on which getShort() can operate.
        Array.getShort(bytes, 0);
        Array.getShort(shorts, 0);

        // The set of array types on which setShort() can operate.
        Array.setShort(shorts, 0, (short)1);
        Array.setShort(ints, 0, (short)1);
        Array.setShort(longs, 0, (short)1);
        Array.setShort(floats, 0, (short)1);
        Array.setShort(doubles, 0, (short)1);
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?