why sometimes compile sometime would not compile?
Why a program without having NumberFormatException in catch could compile even if it has run time problem , but a program without catch(MalformedURLException e) and catch(IOException e) would not compile?
Can anyone explain this to me?
Thanks in advance
Re: why sometimes compile sometime would not compile?
Difference is checked versus unchecked exceptions. Google these terms, and the following touches on the subject:
What Is an Exception? (The Java™ Tutorials > Essential Classes > Exceptions)