Search:

Type: Posts; User: arvindbis

Search: Search took 0.09 seconds.

  1. Replies
    13
    Views
    2,265

    [SOLVED] Re: how to format double value?

    what i'm thinking is if round off that 9 then .304 will become .305 and eventually .31 for up two digits after (dot) decimal point.
    well i'm glad that you have taken so much pain. thank you very...
  2. Replies
    13
    Views
    2,265

    [SOLVED] Re: how to format double value?

    Is this only solution to this problem?
    well my value is 1174.304999999998 can be rounded to 1174.31 according to mathematics as if we try to remove any 9 then left digit to its right is increased...
  3. Replies
    13
    Views
    2,265

    [SOLVED] Re: how to format double value?

    1174.30499999998(which is the checking software reports) which must be rounded to 1174.31 i.e. upto two decimal points (required)
    also if i replace
    "Form.format(total)" with just "total" then same...
  4. Replies
    13
    Views
    2,265

    [SOLVED] Re: how to format double value?

    "total" is the variable which resides in getEstimate() called from main.
    first line is given by "printf" statement.(resides in getEstimate() method)
    next line is shown by "println" statement (also...
  5. Replies
    13
    Views
    2,265

    [SOLVED] Re: how to format double value?

    here is what my actual output:
    C:\Documents and Settings\Administrator\Desktop\java>javac GroceryPlan.java

    C:\Documents and Settings\Administrator\Desktop\java>java GroceryPlan
    total amount :...
  6. Replies
    13
    Views
    2,265

    [SOLVED] Re: how to format double value?

    indeed, my code does, still it i'm not getting formatted output.(please refer to image provided)

    please run my code and then compare output with the...
  7. Replies
    13
    Views
    2,265

    [SOLVED] how to format double value?

    here is waht I'm tring to do:


    and coding done by me

    import java.text.DecimalFormat;
    public class GroceryPlan {
    static double[] test1 =...
Results 1 to 7 of 7