Program to find Circumference of a Circle | Java program to find circumference of circle ; utility function ; driver function
import java . io . * ; class Geometry { static double circumference ( double r ) { double PI = 3.1415 ; double cir = 2 * PI * r ; return cir ; } public static void main ( String [ ] args ) { double r = 5 ; double result = Math . round ( circumference ( r ) * 1000 ) / 1000.0 ; System . out . println ( " Circumference ▁ = ▁ " + result ) ; } }