line break in seuqential file
I have a class with 4 objects and i want to write them to a sequental file.
The class has a toString method which returns this
return givenName +"\n"+ department +"\n"+ anualSalary +"\n"+ hireDate;
Now if im juts outputting that out into jav it does what i want which is
all on seperate lines
Yet when i output to a sequential file it doesnt recognize the "\n"
and prints it all on one line
How do i get it so it will output to the file just like it prints in java?
You can also use System.getProperty("line.separator") to do it in a system independent sort of way.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL