# Java Program To Calculate Area and Circumference of Circle ~ foundjava ### Java Program To Calculate Area and Circumference or Perimeter of Circle we are going to see java program to calculate area and circumference of circle by the help of different - different java programs.

Let's see java program for area of circle with step-by-step.

We will use formula to calculate the area and perimeter or circumference of circle. The formula is given below.

1) Calculate Area of Circle Formula

2) Calculate Circumference of Circle Formula

### (1) Area of Circle in Java Program 1

This is simple java program to find area of circle where we will take radius value from the user and then calculate area of circle.

import java.util.Scanner;
class AreaOfCircle
{
public static void main(String args[])
{
//creating Scanner
Scanner sc = new Scanner(System.in);

System.out.println("Area of Circle is : "+area);
}
}

5
Area of Circle is : 78.53981633974483

### (2) Area of Circle in Java Program 2

This is another java program to calculate area of circle using constructor where we create constructor for calculating the circle area.

import java.util.Scanner;
class AreaOfCircle2
{
double area;

{
System.out.println("Area of Circle is : "+area);
}
}

class Test
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);

double r = sc.nextDouble();
AreaOfCircle2 a = new AreaOfCircle2(r);
}
}

5
Area of Circle is : 78.53981633974483

Let's take another simple java program to find area of circle.

### (3) Area of Circle in Java Program 3

This another simple java program to calculate area of circle using method.

import java.util.*;
class AreaOfCircle3
{
//creating static method to find area of circle in java

{
}

public static void main(String args[])
{
Scanner sc = new Scanner(System.in);

double r = sc.nextDouble();
double d = area(r);

System.out.println("Area of Circle is : "+d);
}
}

5
Area of Circle is : 78.53981633974483

### (4) Calculate Circle Perimeter Using Java Example

In this example we will calculate the circle perimeter or circumference by using 2*pi*radius formula.

import java.util.Scanner;
class CircleCircumferenceExample
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);

System.out.println("Circumference of Circle : "+circumference);
}
}

5
Circumference of Circle : 31.41592653589793

Here we discussed that how to calculate area of circle through java program and how to find the perimeter of circle through java program with different - differenct examples.

This post first appeared on Found Java, please read the originial post: here

# Share the post

Java Program To Calculate Area and Circumference of Circle ~ foundjava

×