Hey I need to store the following hex value in a byte array - 0xCAFEBABEDEADBEEF.
So I tried to store it like so.
byte[] v0 = {11001010,11111110,10111010,10111110,11011110,10101101,10111110,11101111};
where 11001010 is CA in binary, 11111110 is FE in binary etc.
But I get an error saying 11001010 is an int, so I presume this is because bytes are signed bytes in java, and we can only have values between +127 and -128.
So is there way I can do this in java(maybe using unsigned bytes...if they exist!?) Thanks guys.