java saving String to file

Discussion in 'Java' started by jameson737, Sep 29, 2006.

  1. jameson737

    jameson737

    Joined:
    Sep 29, 2006
    Messages:
    1
    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
    Last edited: Sep 29, 2006
    jameson737, Sep 29, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Kandell
    Replies:
    4
    Views:
    4,156
    eeebop
    Dec 10, 2004
  2. Luis Esteban Valencia
    Replies:
    0
    Views:
    2,508
    Luis Esteban Valencia
    Jan 6, 2005
  3. jay
    Replies:
    3
    Views:
    7,877
  4. Rune Allnor
    Replies:
    3
    Views:
    371
    Richard Herring
    Jan 15, 2010
  5. Lovely Angel For You

    Saving Images While Saving ASP Pages !

    Lovely Angel For You, Oct 2, 2003, in forum: ASP General
    Replies:
    1
    Views:
    206
    Curt_C [MVP]
    Oct 3, 2003
Loading...

Share This Page