Why am I getting errors?
import java.util.Scanner; public class CalcCircumference { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Do you want to use Diameter of Radius?"); System.out.println("Enter your choice"); String choice = input.nextLine(); if(choice.equalsIgnoreCase("Diameter")) { System.out.println("Enter Diameter"); int diameter = input.nextInt(); double circum = Math.PI * diameter; System.out.println("Choice: Diameter"); System.out.println("Circumference = " + circum); } if(choice.equalsIgnoreCase("Radius")) { System.out.println("Enter Radius"); double radius = input.nextDouble(); double circum = Math.PI * Math.pow(radius, 2); System.out.println("Choice: Radius"); System.out.println("Circuference = " + circum); } } }