Cant find error, whats wrong here?
import java.io.*;
import javax.swing.JOptionPane;
import java.text.DecimalFormat;
public class Paycheck
{
static final double FEDERAL = .15;
static final double STATE = .035;
static final double SOCIAL = .0575;
static final double MEDICARE = .0275;
static final double PENSION = .05;
static final double HEALTH = 75.00;
public static void main(String[] args)
{
PrintWriter outFile = new PrintWriter(new FileWriter("a:\\paycheck"));
DecimalFormat twoDigit = new DecimalFormat("0.00");
String name;
String stringGross;
double gross;
double federalDeduction, stateDeduction, socialDeduction, medicareDeduction, pensionDeduction, healthDeduction;
double totalDeductions;
double netPay;
name = JOptionPane.showInputDialog("Enter your name:");
stringGross = JOptionPane.showInputDialog("Enter your gross earnings:");
gross = Double.parseDouble(stringGross);
federalDeduction = gross * FEDERAL;
stateDeduction = gross * STATE;
socialDeduction = gross * SOCIAL;
medicareDeduction = gross * MEDICARE;
pensionDeduction = gross * PENSION;
healthDeduction = gross * HEALTH;
totalDeductions = federalDeduction + stateDeduction + socialDeduction + medicareDeduction + pensionDeduction + healthDeduction;
netPay = gross - totalDeductions;
outFile.printLn(name);
outFile.printLn("Gross Amount: $" + twoDigit.format(gross));
outFile.printLn("Federal Tax: $" + twoDigit.format(federalDeduction));
outFile.printLn("State Tax: $" + twoDigit.format(stateDeduction));
outFile.printLn("Social Security Tax: $" + twoDigit.format(socialDeduction));
outFile.printLn("Medicare/Medicaid Tax: $" + twoDigit.format(medicareDeduction));
outFile.printLn("Pension Plan: $" + twoDigit.format(pensionDeduction));
outFile.printLn("Health Insurance: $" + twoDigit.format(healthDeduction));
outFile.printLn("Net Pay: $" + twoDigit.format(netPay));
outFile.close();
System.exit(0);
}
}
And the error message I keep getting:
Paycheck.java:40: cannot find symbol
symbol : method printLn(java.lang.string)
location : class java.io.PrintWriter
outFile.printLn(name);
^
I get this same error for every printLn statement
Whats wrong?!?!

