Because I want to use the value of BMI in the toString method
The variable BMI is defined here as local to the method:
public double calculateBMI(double BMI)
Its value is never used in the method and could be removed like this:
public double calculateBMI()
It's put into the toString method and printed in my main class
Can you post the code that shows what is done with the value returned by the method?
There should be an assignment statement:
someVar = someMethod(); // save value returned by method
Did you ever do what I suggested:
Add a print statement first thing in the method that prints the values of those variables.
What was printed?