フリー問題

Java SE 11 Developer のフリー問題 13 / 20 問目

問題文

A reviewer reads that an error from the virtual machine can surface at a point the source does not name, and asks how much execution the platform is allowed to let through before the throw. What is the standing rule, and what supports it?

選択肢

  1. A small but bounded amount of execution may run ahead of the throw, because the reading of the instructions is buffered by the machine and only the boundary of a method is a point at which the state of the frame is whole
  2. The throw has to land at the instruction that the thread was running, because the exception carries the frame of the instruction that raised it and any pause would leave the report pointing at the wrong line of the source
  3. The throw has to land at the instruction that the thread was running, because the source of such an exception is the thread itself and each instruction of it is a point at which the machine may report a failure
  4. A small but bounded amount of execution may run ahead of the throw, because the delay lets an optimized body of code catch such an exception at a point where handling it keeps every rule of the language intact

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。