我有这样的代码:
import java.util.Locale;
Locale locale = new Locale("en_US");
当我写道:
System.out.println(locale.toString());
它返回
en_us
不
en_US
是否可以获得区分大小写的值?
答案 0 :(得分:2)
取自Oracle:
The language field is case insensitive, but Locale always canonicalizes to lower case.