Page 1 of 1

About Question enthuware.ocpjp.v7.2.1163 :

Posted: Sun Dec 30, 2012 3:39 pm
by kappert
The code given to consider...

Code: Select all

Locale myLoc = new Locale(new Locale("fr", "FR"));
ResourceBundle rb = ResourceBundle.getBundle("appmessages", myLoc);
... does not compile. No need to construct Locale twice, it should be:

Code: Select all

Locale myLoc = new Locale("fr", "FR");
ResourceBundle rb = ResourceBundle.getBundle("appmessages", myLoc);
I find it a bit misleading that the suggested solutions will result in "duplicate local variable" compiler errors.

Code: Select all

ResourceBundle rb = ResourceBundle.getBundle("appmessages", Locale.CHINA);
That is what kept me from choosing the correct solutions. Does one really have to expect this type of question in a real exam?
If this is not a realistic Oracle scenario, I would find it clearer to state the possible solutions with reassignments (instead of declaring the same variable again):

Code: Select all

rb = ResourceBundle.getBundle("appmessages", Locale.CHINA);

Re: About Question enthuware.ocpjp.v7.2.1163 :

Posted: Sun Dec 30, 2012 4:10 pm
by admin
You are right. The double new as well as the redeclaration of rs are not right.
It has now been fixed.

The basic objective of this question is to drive the point that once ResourceBundle is created, you can't change it. There are questions on this aspect in the exam.

thank you for your feedback.
-Paul.

Re: About Question enthuware.ocpjp.v7.2.1163 :

Posted: Sun Feb 10, 2013 4:05 am
by Ciprian Mihalache
Today (10 Feb) I downloaded the last question bank (v14) and the fix is not present.
Paul, is it possible to make a new build with the latest fixes?
Thank you.

Re: About Question enthuware.ocpjp.v7.2.1163 :

Posted: Sun Feb 10, 2013 7:20 am
by admin
My mistake. It was fixed in the regular question bank but not propagated to the upgrade question bank. Fixed now.

thank you,
Paul.

Re: About Question enthuware.ocpjp.v7.2.1163 :

Posted: Mon Feb 11, 2013 4:28 pm
by Ciprian Mihalache
Thank you. One strange thing though, I downloaded the latest question bank and I still get version 14. The tool automatically updated the question bank but it also downloads the version v14. Is it possible to be on server the info that last version is 15, but the ets file to be the one from version 14?

Re: About Question enthuware.ocpjp.v7.2.1163 :

Posted: Mon Feb 11, 2013 7:37 pm
by admin
Please try now.
-Paul.

Re: About Question enthuware.ocpjp.v7.2.1163 :

Posted: Tue Feb 12, 2013 4:05 pm
by Ciprian Mihalache
Now it is ok. Thank you.