- Joined
- Sep 29, 2006
- Messages
- 1
- Reaction score
- 0
Hi, there i has a problem :???: of remaining the format of the string after it was save in a text file: Could anyone please help me. Thanks alot.
System.out.println(mergeResult);
has the output of:
Hilton 4445,
high way,
streetOne
Full name : David
Nickname : vid
FileWriter WriteResult = new FileWriter("file.txt");
PrintWriter ResultOutput = new PrintWriter(WriteResult,true);
//print text to file
ResultOutput.println(mergeResult);
But, after saving it in texfile it becomes like this:
Hilton 4445, high way, streetOne Full name : David Nickname : vid
System.out.println(mergeResult);
has the output of:
Hilton 4445,
high way,
streetOne
Full name : David
Nickname : vid
FileWriter WriteResult = new FileWriter("file.txt");
PrintWriter ResultOutput = new PrintWriter(WriteResult,true);
//print text to file
ResultOutput.println(mergeResult);
But, after saving it in texfile it becomes like this:
Hilton 4445, high way, streetOne Full name : David Nickname : vid
Last edited: