Skip to content

Instantly share code, notes, and snippets.

@rbe
Created August 25, 2012 11:54
Show Gist options
  • Select an option

  • Save rbe/3464416 to your computer and use it in GitHub Desktop.

Select an option

Save rbe/3464416 to your computer and use it in GitHub Desktop.
Why is this false? Playing with bitwise operators.
int = 12;
boolean b = i == (3 | 6 | 5 | 7 | 32);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment