Gaurav Chikara wrote:...when I use ps.write("\t\t"); ... results are correct as expected...
I'm a little confused about how you're successfully using ps.write("\t\t"), because PrintStream's write method using a String parameter is private.
The public write methods take an int or a byte. Regarding these, the API says, "Note that the bytes will be written as given; to write characters that will be translated according to the platform's default character encoding, use the print(char) or println(char) methods."
So can you use a print method instead?
The following works for me (using the print method with a String parameter)...
Or am I missing something obvious...?
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org