import java.io.*;
class LineNumberReader1
{
public static void main(String[] args) throws IOException
{
FileReader fr = new FileReader("啊啊啊.txt");
LineNumberReader lnr = new LineNumberReader(fr);
lnr.setLineNumber(100); //从100行开始
String line = null;
while((line=lnr.readLine()) != null)
{
System.out.println(lnr.getLineNumber()+"::::"+line);
}
}
}
java基础入门---- LineNumberReader1
最新推荐文章于 2022-08-04 19:07:46 发布