How to count total number of lines in a file using java?

preview_player
Показать описание
#learnwithkrishnasandeep #javacodinginterviewquestions #javaexamples #javaprograms #javatutorials #javaprogramming
Рекомендации по теме
Комментарии
Автор

I've checked a stackoverflow post and there seems to be a faster way to do this, but you've helped me a lot thanks!

joaomachado
Автор

The issue with this is that if you attempt to re-read the file for whatever reason, the position of the reader is already at the final index/line of the file. I haven't seen a legitimate solution to this issue anywhere. May have to use the "Mark()" and "Reset()" functions somewhere in this class if you want to actually access the data on file.

RyanKelly
Автор

How to count number of lines of a function can u tell

OTFBYFK
join shbcf.ru