ResourceBundle
程序员文章站
2022-05-16 10:38:20
...
//resourcebundle 为包名,Common为properties文件名, "." 可以替换成"/"
Locale locale1 = new Locale("zh", "CN");
Locale locale2 = new Locale("en", "US");
ResourceBundle bundle = ResourceBundle.getBundle("resourcebundle.Common", locale2);
System.out.println("bundle: " + bundle);
System.out.println(bundle.getString("userName"));
下一篇: opencv,c++图像拼接