import java.io.*;
public class Ex6_2 {
/**
* @param args
*/
public static void main(String[] args)throws IOException{
// TODO Auto-generated method stub
String fileName="D:/Hello.txt";
BufferedWriter out=new BufferedWriter(new FileWriter(fileName));
out.write("Hello!");
out.newLine();
out.write("This is another text file using BufferedWriter,");
out.newLine();
out.write("So I can use a common way to start a newline");
out.close();
}
}
其中throws IOException是什么意思啊? 为什么要加这个?