How to remove 2 last lines in a text file?
Can anyone give me a code to remove 2 last lines from a text file?
I'm very new to java, and can almost only make a HelloWorld application.
My text file looks like this:
How can I delete the 2 last lines there?
this is line 1
and this is the 2nd
here comes nr 3
and the 4th is jumping
up and down like nr 5
but the 6th is dead
just like it was stated in the other forum...
No can do.
- Do not post the same question on different forums or sections of forum. It pisses people off.
- Show some effort. The forum will try to help you if you post your code and have specific questions/doubts.