Skip to content

Instantly share code, notes, and snippets.

@dmikurube
Created February 6, 2015 19:22
Show Gist options
  • Save dmikurube/c8546bab2bbee8f390d9 to your computer and use it in GitHub Desktop.
Save dmikurube/c8546bab2bbee8f390d9 to your computer and use it in GitHub Desktop.
public class XorByte {
public static void main(String[] args) {
byte r;
byte x = 0x13;
byte y = (byte)0x9f;
r = x ^ y;
System.out.println(r);
}
}
@dmikurube
Copy link
Author

XorByte.java:6: error: possible loss of precision
r = x ^ y;
^
required: byte
found: int
1 error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment