java IO异常处理
public class FileWriterDemo { public static void main(String[] args) { FileWriter fw = null; try { fw = new FileWriter("s:\\demo.txt"); fw.write("abcde"); } catch (IOException e) { System.out.println(e.toString()); } finally { try { if (fw != null) fw.close(); } catch (IOException e) { e.printStackTrace(); } } } }

浙公网安备 33010602011771号