Java OCA OCP Practice Question 2166

Question

Which of the following cannot be instantiated directly by the caller using the constructor?.

  • I. Locale
  • II. Properties
  • III. ResourceBundle
  • A. I
  • B. II
  • C. III
  • D. I, II
  • E. I, III
  • F. II, III


C.

Note

The Locale class has a constructor taking a language code and an optional country code.

The Properties class is a type of Map so it also has a constructor.

By contrast, a ResourceBundle subclass is typically obtained by calling the ResourceBundle.getBundle() method.

ResourceBundle is an abstract class, so a subclass will get returned like ListResourceBundle.




PreviousNext

Related