문제

Currently, I have:

outByte.writeInt(0x49492a00); 
outByte.writeInt(0x08000000);

But i want to be able to write all of that on the same line. But:

outByte.writeLong(0x49492a0008000000)

is underlined red in Eclipse, and therefore incorrect. Is it possible to write those two lines all in one with writeLong()?

도움이 되었습니까?

해결책

To use a long literal in your source code, you will need to append l or L to the constant like this:

outByte.writeLong(0x49492a0008000000L)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top