After I fix the spelling errors it runs fine for me. I don't get any errors.
Next time please use the code tags
Your code with fixed cases:
import javax.swing.JOptionPane;
public class Bmi {
public static void main(String[] args) {
//declare variables
int height;
int weight;
String accept;
double bmi;
//Accept the height and weight from user
accept = JOptionPane.showInputDialog("Enter Weight");
weight = Integer.parseInt(accept);
accept = JOptionPane.showInputDialog("Enter Height");
height = Integer.parseInt(accept);
//Caculate the BMI with giving formula
bmi = (10 * weight) / (height * height);
// Do If statement to make output
if(bmi < 20)
JOptionPane.showMessageDialog(null,"User is Underweight");
else if (bmi > 30)
JOptionPane.showMessageDialog(null,"User is Overweight");
else
JOptionPane.showMessageDialog(null,"User Has a Good Weight+");
System.exit(0);
}
}