The Mathematical formula to Find Area of a Circle is : A= πr2 or we can write it as given below.
area = pi * radius * radius
Read more »area = pi * radius * radius
So, to find Area of a circle we need the values of 'pi' and Radius. In Java we have predefined Mathematical value for pi is defined in java.lang.Math.PI = 3.141592653589793. PI is a static final value.
In our Program we need to read radius value from the console by using BufferedReader or Console classes.
©JavabynataraJ is a blog with java tutorials and Real time tips.