Monday, January 16, 2006

Throwing nulls as Exceptions

Any ideas what will happen with this bit of Java and why?

    try
    {
        throw null;
    }
    catch (Exception e)
    {
        if (e == null)
                System.out.println("Exception is NULL");
            else
                System.out.println("Exception is: "+e.toString());
    }