Java Code for Circle

This java programming code is used to find the circle . You can select the whole java code by clicking the select option and can use it. When you click text, the code will be changed to text format. This java program code will be opened in a new pop up window once you click pop-up from the right corner. You can just copy, paste this java code and use it to find the circle .

import java.util.*;
import java.lang.*;
import java.lang.Math.*;
public class calculate_circle
{
     public static void main(String []args)
     {
        double r,Area,Diameter,Circumference,Area_Sector;
        double d,p;
        int theta;
        p=3.14;
        r=3;
        d=6;
        theta=30;
        //Area of Circle
        Area= p*Math.pow(r,2);
        System.out.println("Area of Circle is : "+Area);
        //Diameter of Circle
        Diameter= 2*r;
        System.out.println("Diameter of Circle is : "+Diameter);
        //Circumference of Circle
        Circumference=p*d;
        System.out.println("Circumference of Circle is : "+Circumference);
        //Area of Sector
        Area_Sector= p*Math.pow(r,2)*(float)theta/360;
        System.out.println("Area of Sector is : "+Area_Sector);
     }
}
Other Programming Codes
Online Calculator : Circle Calculator
Click on the select code link to copy and paste this free java program code for circle calculator.

english Calculators and Converters


Sitemap