This discussion is archived
9 Replies Latest reply: Sep 5, 2008 11:24 AM by 807589 RSS

write Java Program to read a text file and produce output in another file?

807589 Newbie
Currently Being Moderated
Hello i have a file called This.txt which has the following content in a single line...

"*This page lists articles associated with the same title. If an internal link led you here, you may wish to change the link to point directly to the intended article.~#^$Featured content represents the best that Wikipedia has to offer.~#^$ These are the articles, pictures, and other contributions that showcase the polished result of the collaborative efforts that drive Wikipedia.~#^$New study shows that children of older fathers are at higher risk of psychological conditions~#^$*"

Now the output file should be like this..That is each line should end with ~#^$.

"This page lists articles associated with the same title. If an internal link led you here, you may wish to change the link to point directly to the intended article.~#^$
Featured content represents the best that Wikipedia has to offer.~#^$
These are the articles, pictures, and other contributions that showcase the polished result of the collaborative efforts that drive Wikipedia.~#^$
New study shows that children of older fathers are at higher risk of psychological conditions~#^$"

Now i need to save this file as This1.txt
Can some body help me fetch a code to do this.
thanks