Question: how to use pi java?
Answer: import java. lang. Math. *; public class Pie { public static void main(String[] args) { //radius and length. double radius = 5; double len = 15; // calculate the area using PI. double area = radius * radius * Math. PI;