java如何从文本文件中读取一行,调用该行上的函数并移动到第二行,等等?
如果这个问题很愚蠢,请原谅,但我不能把读者转移到第二行。在每个输入线上调用函数很重要
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader("input.txt"));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
while ((reader.readLine()) != null) {
///////////
}
共 (0) 个答案