Why JVM does not allow to throw Unchecked Exception from static block? But it still allows them implicitly (e.g: calling method on null object).
Note: The question is more academic and not from real life issue.
Why JVM does not allow to throw Unchecked Exception from static block? But it still allows them implicitly (e.g: calling method on null object).
Note: The question is more academic and not from real life issue.
You can throw it with a little hack but you will get ExceptionInInitializerError: