Can anyone tells what wrongs with the program I am trying to write? public class Wages { public static void main(String[] args) { int hourly_rate = 16; int hourly_work_per_day = 8; double tax = .20; double social_security_tax = .06; double totalWagesPlusTaxes; double totalNetEarn; totalWagesPlusTaxes=hourly_rate*hourly_work_per_day; totalNetEarn=totalWagesPlusTaxes-(tax + social_security_tax); System.out.println("Hourly Rate :"+hourly_rate+"Dollar"); System.out.Println("Hourly Works :"+hourly_work_per_day+"Dollar"); System.out.Println("Taxes :"+tax+"Percent"); System.out.Println("Social Security Taxes :"+social_security_tax+"Percent"); System.out.Println("Gross Pay :"+totalWagesPlusTaxes+"Dollar"); System.out.Println("Net Earn :"+totalNetEarn+"Dollar"); } }
Not sure how different JCreator & Eclipse is but: Code: totalWagesPlusTaxes=hourly_rate*hourly_work_per_da y; should be: Code: totalWagesPlusTaxes=hourly_rate*hourly_work_per_day; (no space in 'day') and did Code: println instead of Code: Println Result looked like this: Code: Hourly Works :8Dollar Taxes :0.2Percent Social Security Taxes :0.06Percent Gross Pay :128.0Dollar Net Earn :127.74Dollar