regarding file operation

  • Thread starter tamilarasiramesh
  • Start date
T

tamilarasiramesh

I have written code for writing into text file...It is appended in the
same line...i want to append line by line(incase of student
details)..so that i have used "\n" in between strings..but it is not
working..
give me the solution,,thanks in advance
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

I have written code for writing into text file...It is appended in the
same line...i want to append line by line(incase of student
details)..so that i have used "\n" in between strings..but it is not
working..
give me the solution,,thanks in advance

Try with System.getProperty("line.separator") instead of "\n".

Or better use PrintWriter or PrintStream.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top