帮我看看这个问题啊....
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import
java.io.FileNotFoundException;
import java.io.FileWriter;
import
java.io.IOException;
import java.io.InputStreamReader;
// 注意类名要大写
public class Temp
{
public static void main(String [] args)
{
try
{
String head = "Name,ID,DS,DB ";
byte[] c = new byte[40];
c = head.getBytes();
System.out.println(new String(c));
String record = " ";
// 判断文件是否存在
File dir = new File( "c:\\student.txt ");
if(dir.exists())
{
// 是否有内容
FileInputStream infile = new FileInputStream(dir);
if(infile.read() < 0)
{
record = "Name ID DS DB " + "\r\n ";
}
infile.close();
}
BufferedWriter fo = new BufferedWriter(new FileWriter( "c:\\student.txt ",true));
String[] info = new String[4];
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));