フリー問題

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

問題文

Three constructors of one class each open with an explicit call to another of them, and the build reports a cycle among the three. What is the standing rule, and what supports it?

選択肢

  1. The language bars a constructor from opening with a call to another of them, because the body of a constructor opens with a call of the direct superclass when the author leaves it out, and any call that names the same class is turned down there
  2. The language bars a constructor from reaching itself through those calls, because it is an error for a constructor to invoke itself through a series of one or more explicit calls that name the same class, and every step of the chain counts toward that series
  3. The language bars a constructor from reaching itself through those calls, because it is an error for a constructor to invoke itself through a series of one or more explicit calls that name the same class, and only a chain of three or more is caught
  4. The language bars a constructor from opening with a call to another of them, because the body of a constructor opens with a call of the direct superclass when the author leaves it out, and each explicit call replaces that one

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

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