in pages 264 and 265 of the OCP
Java book, there is an error. In table 5.7 default locale and default language should come after the root resource bundle java class or file.
Asking for a resource bundle for French in France with default locale US English, will make java look for french resources first till the top of the hierarchy of resources (the base resource) and then switch to the default locale or language.
It should look like this:
1.
2.
3.
4.
5. Zoo.java
6. Zoo.properties
7. Zoo_en_US.java
8. Zoo_en_US.properties
9. Zoo_en.java
10. Zoo_en.properties
11. If still not found, throw MissingResourceException
Number 5 and 6 are the base for all resources, so Java will look for them before searching for the default locale or default language.
Based on this page 265 should be as follows:
1. Zoo_en.java
2. Zoo_en.properties
3. Zoo.java
4. Zoo.properties
5. Zoo_hi.java
6. Zoo_hi.properties
This is based on the code on page 264, where you ask for English resource.