I chose A but Whizlabs said C was the correct answer. I confirmed C is correct with the following code:
I understand why C is correct because RuntimeException is narrower than Exception but from reading the K & B book (page 361) I understood that RuntimeExceptions are unchecked (like errors) so it did not matter if they were handled or declared.
Just for my own clarification, if Errors or RuntimeExceptions are caught, they must also adhere to the "narrowest first" rule, right? If this is in the book and I missed it, I'd greatly appreciate it if someone could let me know where it's discussed.
While going through some of the posts of people who have passed the SCJP 1.4 exam, I found that some of them have got questions from files and Swing. Can you please advice me what I should study? I am taking the exam in 2 days so if you could tell me what all is relevant to the exam(as these are not there in the exam objectives), I would be very grateful.