我正在尝试将字节缓冲区存储到二维数组中。
byte[][] input = new byte[128][];
int index = 3;
ByteBuffer b = new ByteBuffer.allocate(128);
b.limit(128);
b.put....
input[index][] = b.get();
我在第二个 [ ] 处收到非法表达式开始错误。
最佳答案
你的语法错误,应该是input[index] = b.get();
。
关于java - 将返回数组的函数存储到二维数组中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36872739/