|
Does not show the if statements in any way?
import javax.swing.JOptionPane;
public class Main{
public static void main(String[] args) {
// declare your variables still
int salesTotal = 5;
double commissionRate = 10;
int salesClass = 10;
if (salesTotal < 10000) {
if (salesClass == 1)
commissionRate = 0.02;
}
else if (salesClass == 2) {
commissionRate = 0.025;
JOptionPane.showMessageDialog(null, "Commission is " + commissionRate+salesClass+salesTotal);
}
}
}
Will not show me the if statements. Is it the fact I forgot to put in the InputMethod?
|