問題文
A helper class is written to restore the fields of another class and it calls the operation that reads the fields of the current class out of a stream, and the call ends with an exception at run time. Where does the rule come from, and what does it settle?
選択肢
- That operation runs from other methods of the class being restored, because the class keeps the fields of the object until the whole graph has been read, and any method of it may pull them in during that window
- That operation runs from other methods of the class being restored, because the class routes the call to the reader that is active for the thread, and each method of the object reaches that reader in turn
- That operation runs from inside the method that reads the object back, because the class states that it reads the fields of the current class that stay in the stream, and only a helper that the reader has registered escapes that exception
- That operation runs from inside the method that reads the object back, because the class states that it may be called from the method of the class being restored alone, and every other caller of it meets an exception that reports a stream out of that state