954,541 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to delete lines of a file in java?

I am currently trying to delete lines of a file in java?

qinise4
Newbie Poster
16 posts since Mar 2006
Reputation Points: 10
Solved Threads: 2
 

Read the file, writing it to a new file at the same time, and omit what should be deleted. Then rename the old file to a different name. rename the new file to the old name, then, if all of that is successful, delete the old file.

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You