Java OCA OCP Practice Question 2122

Question

Which statement about ListResourceBundle is true?.

  • A. A disadvantage over properties files is that you cannot create the value at runtime.
  • B. Names-fr.java is a bad implementation class name.
  • C. Values of type Integer are not allowed.
  • D. None of the above


B.

Note

A ListResourceBundle is a Java class that provides key/value pairs.

The values can be any Java class type and can be created at runtime, making Options A and C false statements.

When you want to provide a language-specific resource bundle, an underscore and the language code are added after the class name.

Since Option B does not have an underscore, it is a false statement.

Since all three statements are false, Option D is the answer.




PreviousNext

Related