Results 1 to 3 of 3
- 11-30-2008, 12:51 PM #1
Member
- Join Date
- Nov 2008
- Posts
- 1
- Rep Power
- 0
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?Java Code: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
Thanks,
Marius.
- 11-30-2008, 01:28 PM #2
Just another cross poster.
New To Java - How to remove 2 last lines in a text file?
db
- 11-30-2008, 03:54 PM #3
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.
CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
Similar Threads
-
how can we remove blank lines from a .txt
By Camden in forum New To JavaReplies: 12Last Post: 07-29-2011, 01:38 PM -
[SOLVED] Writing ArrayList to Text File on seperate Lines
By shinjitsunohana in forum New To JavaReplies: 9Last Post: 08-27-2008, 05:53 PM -
Adding lines at start and end of the text file
By phani532 in forum New To JavaReplies: 5Last Post: 08-27-2008, 03:12 PM -
Remove duplicate lines from a text file
By Dirt.Diver in forum New To JavaReplies: 15Last Post: 06-25-2008, 02:08 PM -
how to remove whitespaces in a text
By christina in forum New To JavaReplies: 2Last Post: 08-03-2007, 05:24 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks