When working on that question I saw that both lists are read-only. However, line //5 is never reached as line //3 throws a RuntimeException which finishes execution (not handled at least in the visible code). Hence, I opted for "Only line //3 will cause an java.lang.UnsupportedOperationException to be thrown at runtime."
Hi, yes, in such questions where the option statements point out individual lines, you can safely assume that the options are exactly about those lines if they are executed. As opposed to the problem statement that asks you about the output of executing a program.
This is specially true when the given code is not really a full executable program but just a code snippet.
If you like our products and services, please help us by posting your review here.