posted 1 month ago
Thank you for welcoming me, Jeanne. I am glad to be part of this group.
I agree with what you said. The code might not throw any exception at all but if we go back to question 4, chapter 13 the question says:
Which lines need to be changed to make the code compile?
If I am correct the code will not compile because it fails to honor the Catch or Specify Requirement for checked exceptions. Line w4 must be enclosed by a try statement that catches the exceptions or we must provide a throws clause in order for it to compile.
I have attached a screenshot of the compilation error when I try to compile the code
get.PNG