Skip to content

Instantly share code, notes, and snippets.

@benjholla
Created October 15, 2018 16:47
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/fe0bb0be062a49b6f1add5b4a0d2866c to your computer and use it in GitHub Desktop.
Save benjholla/fe0bb0be062a49b6f1add5b4a0d2866c to your computer and use it in GitHub Desktop.
Java Puzzle 17 (explain the behavior of this program)
public class Puzzle17 {
public static void main(String[] args) {
run(1.0 / 0.0);
}
public static void run(double i) {
while(i == i + 1) {
System.out.println(i);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment