Results 1 to 6 of 6

Thread: new line

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2006
    Posts
    23

    Angry new line

    i make text area that take the name of file and after that she take the content of word but ihave problem that it append the file name and after that the content of file and that is not what i want
    i want the file name be in line and the content of file in other line
    as the following
    ss.txt
    hallo
    how are you
    how i can make "\n" in java

  2. #2
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: new line

    lineOfText += "\n";

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2006
    Posts
    23

    Re: new line

    thank you for your reply but i want to know what is mean by line of text

  4. #4
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: new line

    lineOfText is the variable that you are appending \n to.

  5. #5
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: new line

    Quote Originally Posted by shereen
    how i can make "\n" in java
    Use:
    Code:
    String newLine=System.getProperty("line.separator");
    And replace all "\n" with the (newLine) variable
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Mar 2006
    Posts
    23

    Re: new line

    thank you very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width