Area of the circle that has a square and a circle inscribed in it | Java implementation of the approach ; Function to return the required area ; Calculate the area ; Driver code
class GFG { static float getArea ( int a ) { float area = ( float ) ( Math . PI * a * a ) / 4 ; return area ; } public static void main ( String args [ ] ) { int a = 3 ; System . out . println ( getArea ( a ) ) ; } }