A circle is a simple shape consisting of all the points in the plane that are equidistant from a point known as the center of the circle. In this article, we will learn how to find the area of the circle.
- Perimeter: A quantity of measurement or boundary of the circle. It is basically the distance around a closed figure.
- Radius: The line segment from the center to any point of the circle is known as radius.
- Diameter: The line segment whose endpoints lie on the circle and passed through the center is known as the diameter of the circle. It is also known as the largest distance between any two points on the circle.
Perimeter Of A Circle:
- Using the radius of the circle:
Perimeter of the circle: P =2 * π * r
Here, r is the radius of the circle.
- Using the diameter of the circle:
Perimeter of the circle: A = π * d
Note: The value of PI in java is 3.141592653589793.
Perimeter of the circle is :31.41592653589793
Perimeter of the circle is :62.83185307179586
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.