Consider the following method for converting milliseconds in
Solution
Code in AreaCircle.java file
import java.util.*;
import java.lang.Math;
//class AreaCircle
public class AreaCircle
{
/*main method*/
public static void main(String args[])
{
/*call the method area */
System.out.println(\"area of the circle is given radius=2.0 :\"+area(2.0));
}
//end of main method
public static double area(double radius)
{
double areaofcircle=Math.PI*radius*radius; /*Area of a circle=pi*r*r */
return areaofcircle;
}//end of area method
}//end of class
Here actual and formal parameters are used to call a method.
A parameter is a variable that pass the value to called function.
Actual parameter: A variable or expression refrenced in the parameter list of a subprogram call.
Formal parameter:A variable declared in the parameter list of a subprogram specification.Formal parameters are the placeholders for the values of actual parameter.
Math.PI is a java constant to calculate phi value in Java
