Results 1 to 2 of 2

Thread: Precision

  1. #1
    c_walker is offline Member
    Join Date
    Oct 2009
    Posts
    17
    Rep Power
    0

    Red face Precision

    Hi, it's me again. I just want to ask if someone knows how to use precision in strings? Rounding off a value using string properties instead of using the printf?? Thanks in advance.

  2. #2
    c_walker is offline Member
    Join Date
    Oct 2009
    Posts
    17
    Rep Power
    0

    Default

    I know the answer now.

    String a = String.format("Php %.2f", amount);

    then, just concatenate it with your other string variables

Similar Threads

  1. Wrong precision
    By lclclc in forum New To Java
    Replies: 0
    Last Post: 09-28-2009, 09:55 AM
  2. help me- loss of precision error??
    By j2vdk in forum New To Java
    Replies: 6
    Last Post: 09-01-2008, 09:23 AM
  3. Replies: 7
    Last Post: 01-12-2008, 09:02 PM

Posting Permissions

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