管理Java 9中有效最终变量的关闭
import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; /** 来 自 nowjava.com - 时代Java **/ public class Main { public static void main(String[] args) { try { writeFile(new BufferedWriter( new FileWriter("test")), "This is easy in Java 9"); } catch (IOException ioe) { System.out.println(ioe); } } public static void writeFile(BufferedWriter writer, String text) { try (writer) { /*