Search:

Type: Posts; User: lordofrandom

Search: Search took 0.11 seconds.

  1. Replies
    8
    Views
    3,079

    [SOLVED] Re: decimal format not working

    This works

    DecimalFormat df=new DecimalFormat("#.00");
  2. Replies
    8
    Views
    3,079

    [SOLVED] Re: decimal format not working

    I found part of the problem, it doesn't add 2 decimal places if there is only 1 decimal place. 8.5 doesn't turn into 8.50. I just need a way to add a 0 if it has only 1 decimal place
  3. Replies
    8
    Views
    3,079

    [SOLVED] Re: decimal format not working

    This is the output:


    Employee Payroll (Sorted by last name)
    F.Name L.Name Hourly Wage Hours Worked Gross Pay 20% Tax Net Pay
    Paul Allen $21.50 ...
  4. Replies
    8
    Views
    3,079

    [SOLVED] Re: decimal format not working

    Employee Payroll (Sorted by last name)
    F.Name L.Name Hourly Wage Hours Worked Gross Pay 20% Tax Net Pay
    Paul Allen $21.50 34 731.0 ...
  5. Replies
    8
    Views
    3,079

    [SOLVED] decimal format not working

    import java.util.Formatter;
    import java.util.*;
    import java.text.DecimalFormat;

    public class program5c
    {
    static DecimalFormat df=new DecimalFormat("#.##"); ...
Results 1 to 5 of 5