Hi, I am trying to create a Body Mass Index page, but keep on getting this same error: C:\BMI.java:147: int cannot be dereferenced bmi.setText(""+bmi); ^ 1 error
I have tried to sort it but have been unsuccessful. Please can someone help me spot the error(s)! Thanks in advance. Code is below:
Sarah, I got it to wrok by changing the name of the variable you use to do the actual calulation to bmiValue. My theory on why it didn't work the way you had it was that you had a textfield and an integer with the same name and this confused the compiler.