//build scanner
Scanner radi= new Scanner(System.in);
System.out.println(“Please enter the radius of the circle. (digits only)”);
//receives the user’s radius input
radius = radi.nextDouble();
//finds diameter
diameter = radius * 2;
//finds radius
area = (3.14159 * radius * radius);
//display information to the user.
JOptionPane.showMessageDialog(null, “The diameter of the circle is ” + diameter + “.\n\nThe area of the circle is ” + area);