A
A
Anton Peat2014-11-24 23:00:54
Java
Anton Peat, 2014-11-24 23:00:54

How to write to a text file one line at a time?

How to write to a text file one line at a time?
And how can you find a substring in a particular file?
Script plz...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai, 2014-11-25
@id_aspin

Writing line by line
www.java2s.com/Tutorial/Java/0180__File/Writelines...
To find a substring, read the file
www.java2s.com/Code/Android/File/GetFileContentsas...
Find a substring elementarily
str.contains(str2)
Use the power of google and java2s, I recommend)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question