Java Indentation

Discussion in 'School Work Help' started by Woody, Mar 14, 2010.

  1. Woody

    Woody Well-Known Member

    213
    41
    0
    lol, how do I indent for each line, so the output would look like that

    ignore the dots:

    ...1
    ...2
    ...3
    ...7
    ...9
    .10
    .11
    .12
    .13

    output.print("what should I put here or anywhere?????"+ num);
    please help.
     
  2. xtirpation

    xtirpation Active Member

    32
    234
    0
    use output.printf(args) instead, you can use that method to print, setting field space and stuff.
     
  3. spider-man

    spider-man Well-Known Member

    466
    55
    1
    output.printf("%.4f", NUMBER)

    //I think f means integer.
     
  4. spider-man

    spider-man Well-Known Member

    466
    55
    1

    No, I mean the f inside the brackets. I think f means integer.
    d is real numbers.
    s means String.
     
  5. xtirpation

    xtirpation Active Member

    32
    234
    0
    if i recall correctly, f means floating point, d means decimal(integer), and s means string. Can anyone verify this?
     
  6. spider-man

    spider-man Well-Known Member

    466
    55
    1
    that's correct!!!