3 ms·
Here's a block of code that will cause most versions of the Java compiler to hang that doesn't use loops or templates: class compilehang { public static
by kamkha 15y ago
Here's a block of code that will cause most versions of the Java compiler to hang that doesn't use loops or templates:
class compilehang {
public static void main(String[] args) {
double d = 2.2250738585072012e-308;
System.out.println("Value: " + d);
}
}
From http://www.exploringbinary.com/a-closer-look-at-the-java-2-2250738585072012e-308-bug/ http://www.exploringbinary.com/a-closer-look-at-the-java-2-2...: apparently the constant in the code above causes Java's double value correction loop to oscillate between two values, thus causing the compiler to hang.