Tuesday, February 1, 2011

Holy Byte Code!

Java hangs when running a simple program to convert a string to a double:
class runhang {
    public static void main(String[] args) {
        System.out.println("Test:");
        double d = Double.parseDouble("2.2250738585072012e-308");
        System.out.println("Value: " + d);
    }
}
It gets even worse: there's a similar compiler hang.

Just when you thought it was safe to assume the java.lang package was free of bugs...

No comments:

Post a Comment