This is a Java Program to Calculate and Display Area of a Circle.

Formula:

Perimeter of circle=pi * radius * radius

Formula:

Perimeter of circle=pi * radius * radius

Enter the radius of the circle as input. Now we use the given formula to calculate the area of the circle using formula.

Here is the source code of the Java Program to Calculate and Display Area of a Circle. The Java program is successfully compiled and run on a Windows system. The program output is also shown below.

import java.util.Scanner;

public class Area

`{`

public static void main(String[] args)

`{`

int r;

double pi = 3.14, area;

Scanner s = new Scanner(System.in);

System.out.print("Enter radius of circle:");

r = s.nextInt();

area = pi * r * r;

System.out.println("Area of circle:"+area);

`}`

`}`

Output:

$ javac Area.java $ java Area Enter radius of circle:5 Area of circle:78.5

**Sanfoundry Global Education & Learning Series – 1000 Java Programs.**

Here’s the list of Best Reference Books in Java Programming, Data Structures and Algorithms.