java.java 396 B

123456789101112131415
  1. public class InfiniteLoop {
  2. /*
  3. * This will cause the program to hang...
  4. *
  5. * Taken from:
  6. * http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/
  7. */
  8. public static void main(String[] args) {
  9. double d = Double.parseDouble("2.2250738585072012e-308");
  10. // unreachable code
  11. System.out.println("Value: " + d);
  12. }
  13. }