I've been looking at code from other projects recently seeing if it could give me ideas to pass time, something I noticed is that in some of these projects the & operator is used when setting variables a lot.
For example,
pixels = image.getRGB(0, 0, width, height, null, 0, width);
for (int i = 0; i < pixels.length; i++) {
pixels[i] = (pixels[i] & 0xff) / 64;
}
or something like,
int x = 64 & 0xff;
What does that & operator do in that context? I've tried finding the answer but seem to come up empty handed, so any help would be much appreciated.