📄 helloworld2.java
字号:
//HelloWorld2.java
public class HelloWorld2{
public static void main (String args[ ]){
int i =0;
String hello[ ]= { "Hello world!", "Hi, Java!", "HELLO, WORLD!" };
while (i<4){
try {
System.out.println (hello[i]);
}
catch(ArrayIndexOutOfBoundsException e) {
System.out.println("The exception is caught at i = " + i);
}
finally {
System.out.println("This is always printed");
}
i++;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -