This works
DecimalFormat df=new DecimalFormat("#.00");
Type: Posts; User: lordofrandom
This works
DecimalFormat df=new DecimalFormat("#.00");
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
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 ...
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 ...
import java.util.Formatter;
import java.util.*;
import java.text.DecimalFormat;
public class program5c
{
static DecimalFormat df=new DecimalFormat("#.##"); ...