フリー問題

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

問題文

A copy is taken of a range whose end index lies past the length of the source array of references, and the call succeeds with a result whose tail holds empty slots. Which of these accounts is the one the class backs?

選択肢

  1. The end index has to lie inside the length of the source, because the class reads the end index as a length rather than as a position and each index past the end of the source is folded back into the range
  2. The end index may lie past the length of the source, because the class fills the copy out to the length that the two indexes ask for and only a source of references may be read past its own end
  3. The end index may lie past the length of the source, because the class pads the copy out to the length that the two indexes ask for and every slot past the source is a reference to nothing
  4. The end index has to lie inside the length of the source, because the class checks both indexes against the source before it copies and any index past the end of it ends the call with a bad index

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

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