的readLine() [英] readLine()

查看:78
本文介绍了的readLine()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..我可以问一个关于readLine()的问题吗?

通过使用以下代码,我可以在输出文件中读取500行中的前200行。

Hi..can I ask one question about readLine()?
By having such below codes, I can get it to read first 200 lines out of 500 lines in an output file.

展开 | 选择 | Wrap | 行号

推荐答案


嗨..我可以问一个关于readLine()的问题?

通过使用以下代码,我可以在输出文件中读取500行中的前200行。
Hi..can I ask one question about readLine()?
By having such below codes, I can get it to read first 200 lines out of 500 lines in an output file.
展开 | 选择 | Wrap | 行号



只需忽略1到200行。也可以确保缓冲区/文本文件中确实有500行!

By just ignoring the lines 1 to 200. Also be sure that there are indeed 500 lines in your buffer/text file!

展开 | 选择 | Wrap | 行号



非常感谢。它工作正常。

起初我使用的是BufferedReader,所以我把它改成了Scanner ......

Eventho我有2个输出文件A& B,它适用于两个文件,通过你的代码......这就是我想要的......再次。
Thank you very much. It''s working fine.
At first I was using BufferedReader, so I changed it to Scanner...
Eventho I have 2 output files A & B, it works for both files by putting your codes...and that''s what I want..tq again.



很高兴听到这一点,欢迎你。

Good to hear that, and you''re welcome.


这篇关于的readLine()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆