Hi all,
Im trying to create and write to a file to create a "list" type document that I can convert to .pdf and print out later on. Below is an example of what I'm doing. out is my file and list in a string array that holds the answers to the questions.
out.println("Is something red? " + list[0]);
out.println("Is something blue? " + list[1]);
out.println("Is my cat dumber than my dog? " + list[2]);
out.println("Will I have any hair left by the time I figure out Java? " + list[3]);
I added the spaces into the strings to attempt to line up the answers for readability when I print out the file. All of this prints to my file, but instead of coming out lined up it comes out more like below...
Is something red? Yes
Is something blue?
No
Is my cat dumber than my dog? Yes
Will I have any hair left by the time I figure out Java?
No
Nothing lines up as expected except for the left justifications of the questions. And the exact placement of the list array items vary....sometimes the first 4 line up, sometimes none do...sometimes they're moved to the next line, etc...Any ideas would be greatly appreciated.
Thanks