[JAVA] printf style printing in java

Discussion in 'OT Technology' started by RyanL, Apr 29, 2005.

  1. RyanL

    RyanL OT Supporter

    Joined:
    Nov 30, 2004
    Messages:
    4,584
    Likes Received:
    0
    Location:
    St. Paul, MN
    Is there a way to do something like this (from c)
    Code:
     printf("%3.4f", variable_name);
     
    in java?

    Basically I want to specify the number of leading and trailing spaces of a variable when it is printed.
     
  2. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden

Share This Page