How to delete a string inside a file (.txt) in Java Programming <p>I would like to delete a string or a line inside a ".txt" file (for example filen.txt). For example, I have these lines in the file:</p> <blockquote> <p>1JUAN DELACRUZ<br/> 2jUan dela Cruz<br/> 3Juan Dela Cruz<br/></p> </blockquote> <p>Then delete the 2nd line (<code>2jUan dela Cruz</code>), so the ".txt" file will look like:</p> <blockquote> <p>1JUAN DELACRUZ<br/> 3Juan Dela Cruz<br/></p> </blockquote> <p>How can I do this?</p>