大神啊,请问。为什么输出的是问号啊?
import java.io.*;
class FileInOutEx{
public static void main(String[] args) throws IOException{
File file_Book1 = new File("Book1.txt");
String bookInfo = "世界是平的\t 350.0\t Friedman\t";
file_Book1.createNewFile();
FileOutputStream fos = new FileOutputStream(file_Book1);
fos.write(bookInfo.getBytes());
fos.close();
FileInputStream fis = new FileInputStream(file_Book1);
System.out.println("书籍名称\t 价格\t 作者\t");
System.out.println("---------------------------------------");
int i = 0;
while((i=fis.read()) != -1)
System.out.print((char)i);
fis.close();
}
}