mybundle_en_ca.java
来自「程序练习中包括书中实例程序代码和练习中要用到的代码,是压缩文件」· Java 代码 · 共 24 行
JAVA
24 行
package examples.i18n;
import java.util.ListResourceBundle;
/** A class to demonstrate how to extend the
* ListResourceBundle class
*/
public class MyBundle_en_CA
extends ListResourceBundle {
/** This method must be overridden by this class
* @return Object[][] containing the key and
* resource pairs
*/
protected Object[][] getContents() {
Object[][] myContents = {
{ "count", new Integer(6) },
{ "weight", new Double(4.56) },
{ "name", "Edgar" },
{ "relationship", "neighbour" }
};
return myContents;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?