Breaking in Java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Cla
    New Member
    • Sep 2007
    • 1

    #1

    Breaking in Java

    Hi,

    Does anybody know how to create a new line break in Java? I tried to use System.out.prin tln("\n"); but it never worked... Thanks in advance for your help

    Cla
  • madhoriya22
    Contributor
    • Jul 2007
    • 251

    #2
    Originally posted by Cla
    Hi,

    Does anybody know how to create a new line break in Java? I tried to use System.out.prin tln("\n"); but it never worked... Thanks in advance for your help

    Cla
    Hi,
    println itselft takes U to the next line. isn't it ?
    Last edited by madhoriya22; Sep 6 '07, 11:53 AM. Reason: To add my signature :)

    Comment

    • Nepomuk
      Recognized Expert Specialist
      • Aug 2007
      • 3111

      #3
      Originally posted by Cla
      Hi,

      Does anybody know how to create a new line break in Java? I tried to use System.out.prin tln("\n"); but it never worked... Thanks in advance for your help

      Cla
      In what context did it not work? Normally, the command
      [CODE=java]
      System.out.prin tln("Hello\nWor ld");
      [/CODE]should give you
      Code:
      Hello
      World
      By the way, if you just want to start an extra line, how about
      [CODE=java]
      System.out.prin tln();
      [/CODE](Yes, that's println without any argument.)

      Greetings,
      Nepomuk

      Comment

      Working...