About Question enthuware.ocpjp.v8.2.1161 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
mountiansandals
Posts: 1
Joined: Wed Feb 28, 2018 12:15 pm
Contact:

About Question enthuware.ocpjp.v8.2.1161 :

Post by mountiansandals »

While technically bad form I thought a country code can be lowercase. This example is cited as being bad but legal in the Boyarsky and Selikoff book:

Locale l2 = new Locale.Builder()
.setRegion("us")
.setLanguage("EN")
.build();

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1161 :

Post by admin »

Yes, the book is partially correct. It is correct because lower case values are indeed valid. It is partially correct because Locale class description does not say anywhere that lower case values are bad form. Both are equally acceptable while creating Locale objects.

However, the issue is that some candidates have claimed to get a similar question that asks them to pick correct values for country codes. It seems that the question is asking about the value as returned by Locale's getCountry method, which indeed returns only upper case values.

Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 85 guests