Results 1 to 5 of 5
Thread: file io problem
- 07-31-2011, 09:57 AM #1
Member
- Join Date
- Jul 2011
- Posts
- 12
- Rep Power
- 0
file io problem
hey everyone
i have a file with several lines. then there is a line saying "i am me". then again there are several lines what i want to do is i want to remove the line "i am me". after removing, all the lines after it have to be shifted up. what i mean is
test
test
test
test
i am me
test
test
test
has to be replaced with
test
test
test
test
test
test
test
please help! google isnt turning up anything concrete that i can understand!
- 07-31-2011, 12:28 PM #2
Member
- Join Date
- Oct 2010
- Posts
- 8
- Rep Power
- 0
Just read the file line by line (using Scanner) and check whether it is equal to "i am me"... if it is not then print it in another temporary file else proceed to next line...
- 08-02-2011, 09:53 AM #3
Member
- Join Date
- Jul 2011
- Posts
- 12
- Rep Power
- 0
thanks man! that never occurred to me
- 08-02-2011, 08:51 PM #4
Member
- Join Date
- Aug 2011
- Location
- Leicester/UK
- Posts
- 2
- Rep Power
- 0
Follow Kowsi
Last edited by Hamza Aldabbas; 08-20-2011 at 05:47 PM.
- 08-03-2011, 02:20 AM #5
Similar Threads
-
problem with JSP file
By daisy in forum JavaServer Pages (JSP) and JSTLReplies: 11Last Post: 10-11-2011, 01:43 PM -
pdf file problem
By idbirohit in forum New To JavaReplies: 0Last Post: 03-03-2011, 12:12 PM -
Got problem with jar-file, any help?
By Igbear in forum Advanced JavaReplies: 7Last Post: 11-20-2010, 09:10 PM -
.BAT File problem
By egbert95 in forum New To JavaReplies: 8Last Post: 08-03-2010, 01:26 AM -
jar file problem
By nishant.4545 in forum New To JavaReplies: 1Last Post: 07-03-2009, 08:36 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks