I'm not sure how to approach a few questions that I've come across on Enthuware, below is an example of one such question:
It does actually throw a StringIndexOutOfBoundsException but that's not the right answer to the question. I understand the explanation in that the
String class itself throws an IndexOutOfBoundsException for this method but really I'not sure how far I should follow this line of thinking when approaching the questions in the exam which I'm due to take next Friday.
Should I memorize exactly which methods throw which exception in the API as opposed to the subexceptions that they throw when run? Can anyone who has done the exam let me know if the OCA questions are similar to this?