If I have the following:
byte[] byteArray = new byte[] {87, 79, 87, 46, 46, 46};
I know that the size of each element would be one byte. But what I don't seem to understand is how would the integer 87
be stored in one byte? Or, how does the byte[]
store data?
EDIT: I see that you can store -128 to 127 in a byte here in java. So, does that mean there is no way to store anything greater than or lesser than those numbers in a byte[]
? If so, doesn't that limit the use of this? Or am not understanding the exact places to use a byte[]
.