I require searching a word in a text file and display the line number using java. If it appears more than once I need to show all the line numbers in the output. Can anyone help me please?
Read the text file using Java class LineNumberReader and call method getLineNumber to find the current line number.
http://docs.oracle.com/javase/7/docs/api/java/io/LineNumberReader.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With