I have a couple of problems relating to the use of files as required by the Cypher2 and Decyphering tutorials. My first problem is to do with outputting to a file. Instead of getting a file with 2 seperate lines of text i.e. the jumbled word and the line containing the indexes, I get just one line of text with the jumbled word followed immediately by the indexes. This is despite using println. My output looks as it should when I use the console for instance.
My second problem is relates to inputting from a file. I manually adjusted the file outputted as described above to look as it should and then tried to input it to my decyphering programme. This resulted in an error. I've manually inputted the strings using the console and my programme seems to work ok. I suspect it could be some sort of reverse of the outputing issue I'm encountering.
As everything seems to work fine using the console I think my problems stem from the use of files rather than the actual programme logic. If anyone has any thoughts on the above it'd be most appreciated.