Why return is not forced by complier when method throws Throws Exception
author and iconoclast
posted 8 years ago
The only time that the compiler will insist you add a return statement is if control reaches the end of a non-void method. That never happens here: before the method gets to the end, you throw an exception, which leaves the method, so no return is needed since it would never happen, anyway.