import java.util.Scanner; public class CircleMeasurements { public static void main(String args[]) { final double PI = 3.14159; // Prompt the user to enter a radius System.out.print("Please enter the radius of the circle: "); // Create a Scanner for reading console input Scanner in = new Scanner(System.in); // Read a double value double radius = in.nextDouble(); // diameter = radius * 2 System.out.println("Diameter is " + 2 * radius); // perimeter = 2 * pi * radius System.out.println("Perimeter is " + 2 * PI * radius); // area = pi * radius * radius System.out.println("Area is " + PI * radius * radius); // Close the Scanner in.close(); } }