📄 iconstd.java
字号:
// An interface that contains constants.
interface IConst {
int ARRAYSTAR = 0;
int ARRAYEND = 10;
String ERRORMSG = " ERROR! OVER ARRAY NUMBERS! ";
}
class IConstD implements IConst {
public static void main(String args[]) {
int nums[] = new int[ARRAYEND];
for(int i= ARRAYSTAR; i < 11; i++) {
if(i >= ARRAYEND) System.out.println(ERRORMSG);
else {
nums[i] = i;
System.out.print(nums[i] + " ");
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -