The new line was pretty easy and I feel dumb for asking:
BufferedWriter out = new BufferedWriter(new FileWriter(fileName));
//The while the vector is not empty keep processing
while (intCounter < vecList.size())
temp = (FundsTxnMaster)vecList.get(intCounter);
//temp.printAll();
out.write("this is a test"
//would like a tab here
out.write("this is a test"
out.newLine();
intCounter++; //Increment the counter
}
tabs, carriage returns, backslash and quotes are 'Escape Characters'
You can't write these in your code between " " like other characters. Instead you have to use Escape Sequences.
These sequences begin with a backslash
This is what I find in the API specification of BufferedWriter:
public void newLine() throws IOException
Write a line separator. The line separator string is defined by the system property line.separator, and is not necessarily a single newline ('\n') character.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.