Page 1 of 1
About Question enthuware.ocpjp.v7.2.1769 :
Posted: Fri Jan 13, 2017 3:15 am
by jagoneye
If default locale is not given in the question then we have to assume that exception will be thrown if no suitable Resource Bundle is found right?
Re: About Question enthuware.ocpjp.v7.2.1769 :
Posted: Fri Jan 13, 2017 11:54 am
by admin
That is correct.
Re: About Question enthuware.ocpjp.v7.2.1769 :
Posted: Fri Jan 13, 2017 1:40 pm
by jagoneye
Thanks!
Re: About Question enthuware.ocpjp.v7.2.1769 :
Posted: Sat Mar 07, 2020 10:19 am
by FlatPanda
I was surprised by the fact that the Language part can be something else than an Alpha-2 Language code. Would it be beneficial to expand the note with at least a link to the corresponding section of the Javadoc? I am thinking about this paragraph:
https://docs.oracle.com/en/java/javase/ ... f_language
Based on this question and the provided explanation one could assume that
Code: Select all
new Locale.Builder().setlanguage("indianenglish").build()
works but that will throw an
Code: Select all
java.util.IllformedLocaleException: Ill-formed language: indianenglish [at index 0]
Re: About Question enthuware.ocpjp.v7.2.1769 :
Posted: Sat Mar 07, 2020 10:17 pm
by admin
You are not required to know or recognize valid language codes for the exam, so, you can assume that the value given for the language parameter is valid.
In this question, the focus is on identifying the properties files that should be available for the given code to work. As the explanation notes, the exception will be thrown because there is no matching properties file available.