Hi!
I have the following code, but when i run it the output get the circumference to 0.0.
Would appreciate any help! Thanks!
private void doButton1ActionPerformed(java.awt.event.ActionEven t evt) {
output.append("the circumference is " + circumference);
}
public double circumference(double radius) {
final double PI = 3.1415;
radius = Double.parseDouble(input1.getText());
circumference= 2*PI*radius;
return circumference;
}
double circumference;
method_PI.jpg