Fill in the blanks to complete the following code for a Java resource bundle.
public class Flights_en extends ___ { protected Object[][] ___() { return new Object[0][0]; } }
A. JavaResourceBundle, getContents B. JavaResourceBundle, getProperties C. ListResourceBundle, getContents D. ListResourceBundle, getProperties
C.
There is not a built-in class called JavaResourceBundle
, making Options A and B incorrect.
The ListResourceBundle class is used to programmatically create a resource bundle.
It requires one method to be implemented named getContents()
, making Option D incorrect and Option C correct.
This method returns a 2D array of key/value pairs.