??
字號:
import java.io.*;
public class Example
{
public static void main(String args[ ])
{
File file=new File("hello.txt");
char b[]="歡迎welcome".toCharArray();
try{
FileWriter out=new FileWriter(file);
out.write(b);
out.write("來到北京!");
out.close();
FileReader in=new FileReader(file);
int n=0;
while((n=in.read(b,0,2))!=-1)
{
String str=new String(b,0,2);
System.out.println(str);
}
in.close();
}
catch(IOException e)
{
System.out.println(e);
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -