Question: Write a method called area that accepts as a parameter the radius of a circle and that returns the area of the circle. For example,
Write a method called area that accepts as a parameter the radius of a circle and that returns the area of the circle. For example, the call area(2.0) should return 12.566370614359172. Recall that area can be computed as pi (π) times the radius squared and that Java has a constant called Math.PI.
Step by Step Solution
3.40 Rating (156 Votes )
There are 3 Steps involved in it
public static doub... View full answer
Get step-by-step solutions from verified subject matter experts
