Skip to content

Instantly share code, notes, and snippets.

@benjholla
Created August 29, 2018 22:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjholla/ad1a0b35a5f98c1617afc9064329b6d4 to your computer and use it in GitHub Desktop.
Save benjholla/ad1a0b35a5f98c1617afc9064329b6d4 to your computer and use it in GitHub Desktop.
Java Puzzle 3 (spot the bug if one exists)
public class Puzzle3 {
public static void main(String[] args) {
// find and print NOP
for(byte b = Byte.MIN_VALUE; b < Byte.MAX_VALUE; b++) {
if(b == 0x90) {
System.out.print("Found: 0x90 NOP byte");
}
}
}
}
@benjholla
Copy link
Author

Adapted from Java Puzzlers: Traps, Pitfalls, and Corner Cases - Puzzle #24

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