Java Program to Calculate Area of Circle

Here is a simple java program to calculate area of a circle..

class areaofcircle
{
    public static void main(double radius)
    {
        double pi=22.0/7;
        double area=pi*radius*radius;
        System.out.println(“RADIUS :”+radius);
        System.out.println(“Therefore AREA OF CIRCLE :”+area);
    }
}

You just need to use the formula of area.

Add Comment