filehandlegctest.java

来自「gcc-you can use this code to learn somet」· Java 代码 · 共 25 行

JAVA
25
字号
// Make sure that file handles are garbage collected.import java.io.*;public class FileHandleGcTest{  static void kill () throws FileNotFoundException  {    for (int i = 0; i < 65536; i++)      {	FileInputStream f = new FileInputStream ("/dev/null");      }  }  public static void  main (String argv [])  {    try      {	kill ();      }    catch (FileNotFoundException _)      {      }  }}

⌨️ 快捷键说明

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