This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
For Checked Exceptions, all the methods can Duck the exception by either handling it or declaring it. Now when the exception is ducked to main() and the main just declares it the JVM will shutdown the appliction. My doubt is... Is it ok to just declare the Exception at main() or should it be handled. In the exam if a question comes what should I answer?
If you worry you cannot work... If you work you need not worry
Its just a matter of ending the program gracefully. If you don't handle exceptions in main then sometime or the other the user of the program will have to see the not so user friendly Stack Trace....To avoid this you can declare everything in the main method in a try-catch block and then in case of any exception you can display the message of the exception to the user...