フリー問題

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

問題文

A team moves a localized application into a named module and keeps the factory call that hands a lookup strategy object to the bundle search, and that call now ends with an exception where it used to load a custom format. Where does the rule actually come from, and what does it settle?

選択肢

  1. The factory method that takes such an object still works there, because the module system treats the strategy object as ordinary code of the application, and every package that a bundle lives in is open to the class that asks
  2. The factory method that takes such an object is unsupported there, because the class states that the object is meant for an application deployed outside a named module, and a service that supplies bundles takes its place in every case
  3. The factory method that takes such an object still works there, because the search that the factory method runs falls back on the class loader whenever the module system turns the format down, and the strategy object survives that fallback
  4. The factory method that takes such an object is unsupported there, because the class states that such an object has to be registered as a service, and only then is a named module able to load a format of its own

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

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