フリー問題

Java SE 8 Programmer II のフリー問題 1 / 20 問目

問題文

A nested type is declared without the keyword that would detach it from what surrounds it, and it is then handed a field that the whole family of such values would share. Which rule turns that field declaration away?

選択肢

  1. The declaration is turned away because a nested type of that kind is tied to an enclosing instance and reachable from inside of it so it has nowhere to keep a field that stands apart from a single one of them.
  2. The declaration is turned away because a nested type of that kind is closed to inheritance by a modifier written in its header so it has nowhere to keep a field that stands apart from a single one of them.
  3. The declaration is turned away because a nested type of that kind is resolved during a run through a lookup made at that moment so it has nowhere to keep a field that stands apart from a single one of them.
  4. The declaration is turned away because a nested type of that kind is compiled into a separate unit that loads by itself later on so it has nowhere to keep a field that stands apart from a single one of them.

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

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