I have looked over this program numerous of times and cant seem to get it running, can some one please guide me in the right direction.
My error information is AnnualSalary.ja va:33: ' ) ' expected if (AnnualSalary <= 15,000) {
[CODE=java] /*
* AnnualSalary.ja va
*
* Created on September 18, 2007, 9:56 AM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package AnnualSalary;
/**
*
* @author felde301
*/
import javax.swing.JOp tionPane;
public class AnnualSalary {
/** Creates a new instance of AnnualSalary */
public AnnualSalary() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
JOption.showInp utDialog (null,"Enter an annual salary:",
JOptionPane.QUE STION_MESSAGE);
if (AnnualSalary <= 15,000){
taxratecategory = '1';
}else if (AnnualSalary <= 15,000 - 25,000)
{
taxratecategory = '2';
}else if (AnnualSalary => 25,001 - 40,000)
{
taxratecategory = '3';
}else if (AnnualSalary => 40,0001 - 65,000)
{
taxratecategory = '4';
}else if (AnnualSalary => 65,001 - 80,000)
{
taxratecategory = '5';
}else if (AnnualSalary => 80,000)
taxratecategory = '6';
//end if
//display the result
JOptionPane.sho wMessageDialog( null, "The tax rate category for an annual salary");
}
}[/CODE]
My error information is AnnualSalary.ja va:33: ' ) ' expected if (AnnualSalary <= 15,000) {
[CODE=java] /*
* AnnualSalary.ja va
*
* Created on September 18, 2007, 9:56 AM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package AnnualSalary;
/**
*
* @author felde301
*/
import javax.swing.JOp tionPane;
public class AnnualSalary {
/** Creates a new instance of AnnualSalary */
public AnnualSalary() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
JOption.showInp utDialog (null,"Enter an annual salary:",
JOptionPane.QUE STION_MESSAGE);
if (AnnualSalary <= 15,000){
taxratecategory = '1';
}else if (AnnualSalary <= 15,000 - 25,000)
{
taxratecategory = '2';
}else if (AnnualSalary => 25,001 - 40,000)
{
taxratecategory = '3';
}else if (AnnualSalary => 40,0001 - 65,000)
{
taxratecategory = '4';
}else if (AnnualSalary => 65,001 - 80,000)
{
taxratecategory = '5';
}else if (AnnualSalary => 80,000)
taxratecategory = '6';
//end if
//display the result
JOptionPane.sho wMessageDialog( null, "The tax rate category for an annual salary");
}
}[/CODE]
Comment