# Java Program to find Diameter, Circumference, and Area of a Circle

Write a Java Program to find the Diameter, Circumference, and Area of a circle with an example. This example allows entering the circle radius and finding the diameter, area, and circumference using a math formula.

• Diameter of a Circle = 2 * radius
• Area of a Circle = π * radius2
• Circumference of a Circle = 2 * π * radius
```package Area;

import java.util.Scanner;

public class DCAOfCricle1 {

private static Scanner sc;

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

circumference = 2 * Math.PI * radius;

System.out.println("\nArea of a Circle        = " + area);
System.out.println("Diameter of a Circle      = " + diameter);
System.out.println("Circumference of a Circle = " + circumference);
}
}```

## Java Program to find Diameter, Circumference, and Area of a Circle

This program declared a calcDiameter, calcArea, and calCircumference functions that return the Circle Diameter, Circumference, and Area.

```package Area;

import java.util.Scanner;

public class DCAOfCricle2 {

private static Scanner sc;

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

System.out.println("\nArea of a Circle        = " + area);
System.out.println("Diameter of a Circle      = " + diameter);
System.out.println("Circumference of a Circle = " + circumference);
}

public static double calcDiameter(double radius) {
}
public static double calcArea(double radius) {
}
public static double calCircumference(double radius) {
return 2 * Math.PI * radius;
}
}```
``````Please Enter the Circle radius = 12

Area of a Circle        = 452.3893421169302
Diameter of a Circle      = 24.0
Circumference of a Circle = 75.39822368615503``````