[英]There is an error in the code and I do not know how to correct it
I have an error in the arrayOfByte1.length and I do not know if it is well structured 我在arrayOfByte1.length中有一个错误,我不知道它是否结构正确
byte[] arrayOfByte1 = paramAnonymousMessage.getData().getByteArray("DeviceData");
arrayOfByte1.length;
it gives error: 它给出了错误:
- Error:(1381, 33) error: not a statement
- Error:(1381, 33) error: not a statement
- Error:(1734, 27) error: illegal start of expression
- Error:(1734, 27) error: illegal start of expression
those two errors in that line of code of arrayOfByte1.length. 那行arrayOfByte1.length的代码中的这两个错误。
It is because arrayOfByte1.length;
这是因为arrayOfByte1.length;
is not a statement but a variable . 不是陈述而是变量 。 So, you need to use variable to hold the value with: 因此,您需要使用变量来保存以下值:
int length = arrayOfByte1.length;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.