⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 helloworld2.java

📁 java程序设计 清华出版社 孙燮华老师编写的程序源代码
💻 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 + -