public class Result {
private File result =new File("result.txt");
private FileWriter writer;
private PrintWriter pw;
public Result() {
try {
writer = new FileWriter("result.txt");
pw=new PrintWriter(writer);
}
catch (IOException iox){
System.err.println(iox);
}
}
public void aLine(String in) { //写入一�BR> pw.println(in);
}
public void finish() { //å…³é—输入‹¹ï¼Œž®†æ–‡å—从¾~“å˜å†™å…¥æ–‡äšg
try{
pw.flush();
writer.close();
}catch (IOException iox){
System.err.println(iox);
}
}
}