readint()方法的使用问题

使用datainputstream中的readerint()方法从输入文件中读取学生成绩
姓名 语文 数学 外语
张三 89 92 95
李四 77 81 74
王五 87 80 75
比如表如上所示
没有人知道吗?

第1个回答  2009-05-17
import java.io.*;

public class TestReaderint {

public static void main(String[] args) throws IOException {
File f = new File("c:/javacode/new.txt");
FileInputStream input = new FileInputStream(f);
DataInputStream datainput = new DataInputStream(input);
byte[] b = new byte[100];
System.out.println(datainput.readInt());
}
}
第2个回答  2009-05-22
QQ上说 HI也行本回答被提问者采纳