📄 ex6_3.java
字号:
import java.io.*; class Ex6_3 { public static void main ( String[] args ) { String fileName = "c:\\Hello.txt" ; try { //将所有IO操作放入try块种 FileWriter writer = new FileWriter( fileName ,true ); writer.write( "Hello!\n"); writer.write( "This is my first text file,\n" ); writer.write( "You can see how this is done. \n" ); writer.write("输入一行中文也可以\n"); writer.close(); } catch ( IOException iox) { System.out.println("Problem writing" + fileName ); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -