finallytest.java

来自「本java源程序包括了大量的学习程序(共27章)方便大家学习」· Java 代码 · 共 24 行

JAVA
24
字号
import java.io.*;class FinallyTest{  public static void main(String argv[])  {    File file = null;    BufferedReader input = null;    file = new File("abc.txt");    try    {        input = new BufferedReader(new FileReader(file));    }    catch(FileNotFoundException e1)    {        System.out.print("abc.txt is not found: " );        System.out.println("This is FileNotFoundException");    }    finally    {      System.out.println("This is finally code part.");    }  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?