我想,如图掌握的Java应用程序内这里.我不能.我创建了一个ListResourceBundle类似于声明的类,并尝试检索键.我不断得到一个例外.如果您查看教程,它会说使用.class文件.这不可能是对的,可以吗?
[项目树]

[源代码]
以下是我正在使用的两个类,只是MainWindow_xx_XX.java文件中的一个,因为它们基本相同.首先是ListResourceBundle:
public class MainWindow_en_US extends ListResourceBundle {
@Override
protected Object[][] getContents() {
return contents;
}
private Object[][] contents = {
{"fileLabel", "File"},
{"newSessionLabel", "New session..."},
{"openSessionLabel", "Open session..."},
{"saveLabel", "Save"},
{"exitLabel", "Exit"},
{"editLabel", "Edit"},
{"toolsLabel", "Tools"},
{"helpLabel", "Help"}
};
}
Run Code Online (Sandbox Code Playgroud)
现在我用它加载它的方法:
private static final int DEFAULT_LOCALE = 0;
private ResourceBundle bundle;
public static Locale locale;
public static final Locale[] supportedLocales = {
new Locale("en", "US"),
new Locale("es", "ES")
};
public MainWindow() …Run Code Online (Sandbox Code Playgroud) 我需要为 Intraweb 组件设置一个自定义元标记。
如果我在模板 (HTML) 上设置元,则此元来自大量内容(自定义 Intraweb 元和自生成的 JavaScript)并且无用。如您所知,<meta http-equiv="X-UA-Compatible" content="IE=edge" />必须是页面的第一个元标记。
在这方面需要帮助。
我正在使用 Rad Studio 2007。
发现'x'和'y'之间的线性运算......
这是我的代码:
public class Program {
public static int Puzzle(int x, int y) {
return ( x / y ) * y;
}
}
Run Code Online (Sandbox Code Playgroud)
这是结果:
x y EXPECTED RESULT YOUR RESULT DESCRIPTION
1 1 1 1
2 2 2 2
919 648 1135 648 Mismatch
Run Code Online (Sandbox Code Playgroud)
我无法想象会写什么代码.