Delete comment from: Java67
What the mistake in my code
import java.util.Scanner;
public class TaxIncome {
public static void main(String[] args) {
double TaxableIncome;
double Deductions;
double TaxAmount;
String Status;
double RATE1 = 0.10;
double RATE2 = 0.20;
double RATE3 = 0.35;
Scanner scan = new Scanner (System.in);
System.out.print("INCOME TAX CALCULATOR: ");
public double TaxIncome(double IncomeTax, double Deductions, String Status) {
this.IncomeTax = IncomeTax;
this.Deductions = Deductions;
this.Status = status;
}
public void setDeductions( double deductions) {
Deductions a = Dedeuctions;
}
public double getTaxableIncome() {
return TaxableIncome;
}
public double CalculateTaxincome() {
if (Status.equals("single")) {
//nasted if
if ( TaxIncome >= 21000 ) {
Income_tax_amount = Total_income * RATE1;
} else {
Income_tax_amount = Total_income * RATE2;
}
}
return TaxAmount;
}
}
}
Apr 11, 2020, 3:40:09 AM
Posted to How to fix "illegal start of expression" error in Java? Example