About Question enthuware.ocpjp.v7.2.1769 :
Moderator: admin
-
- Posts: 97
- Joined: Wed Dec 28, 2016 9:00 am
- Contact:
About Question enthuware.ocpjp.v7.2.1769 :
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?
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1769 :
That is correct.
-
- Posts: 97
- Joined: Wed Dec 28, 2016 9:00 am
- Contact:
-
- Posts: 8
- Joined: Sun Feb 23, 2020 6:51 am
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1769 :
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 works but that will throw an
Based on this question and the provided explanation one could assume that
Code: Select all
new Locale.Builder().setlanguage("indianenglish").build()
Code: Select all
java.util.IllformedLocaleException: Ill-formed language: indianenglish [at index 0]
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1769 :
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.
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.
Who is online
Users browsing this forum: Google [Bot] and 5 guests