- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java program to find the area of a circle
Area of a circle is the product of the square of its radius, and the value of PI, Therefore, to calculate the area of a rectangle
- Get the radius of the circle.
- Calculate the square of the radius.
- Calculate the product of the value of PI and the value of the square of the radius.
- Print the result.
Example
import java.util.Scanner; public class AreaOfCircle { public static void main(String args[]){ int radius; double area; Scanner sc = new Scanner(System.in); System.out.println("Enter the radius of the circle ::"); radius = sc.nextInt(); area = (radius*radius)*Math.PI; System.out.println("Area of the circle is ::"+area); } }
Output
Enter the radius of the circle :: 55 Area of the circle is ::9503.317777109125
- Related Articles
- Find the Area of a Circle in Java Program
- Python Program to find the area of a circle
- Swift Program to Find the Area of a Circle
- Kotlin Program to Find the Area of a Circle
- JavaScript program to find area of a circle
- C Program for Program to find the area of a circle?
- Java program to find the circumference of a circle
- Java Program to Find the Perimeter of a Circle
- Java program to find the area of a square
- Java program to find the area of a rectangle
- Java program to find the area of a triangle
- Java Program to Find the Area of a Trapezium
- Java Program to Find the Area of a Parallelogram
- Find the Area of a Circle Inscribed in a Square in Java
- C program to find the area of circle and cylinder using structures.

Advertisements