Write a method that has the radius of the circle passed


Write a method that has the radius of the circle passed into it. It computes the area, and returns the area to the main method.
Also, write a line of code that might "call" the method from the main method. Example: x = theMethod(z);

This is what I have so far:
public class Circle {
public static double circleArea (double radius) {
double area = radius * radius * Math.PI ;
return area ;
}
// Main method
public static void main(String[ ] args) {
double radius = 0
try{

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write a method that has the radius of the circle passed
Reference No:- TGS0645043

Expected delivery within 24 Hours