写文件咋写不进去
写不进去,文件最后还是0个字节!
import java.io.Console;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Date;
import java.util.Scanner;
public class Empty
{
public static void main(String[]args)
{
File file = new File("C:\\Users\\Administrator\\Desktop\\20.txt");
try
{
PrintWriter out = new PrintWriter( file );
out.print("ff");
}
catch( FileNotFoundException e)
{
}
}
}