So I'm trying to make a simple calculator in java but have no clue how to get an input for which operation. The program asks for two numbers, then asks for an operator. Everything works fine when i run it until i get to the operation type. The compiler just skips right over it and doesn't even let me type anything in for it. Any clues?
Scanner keyboard = new Scanner(System.in);
double x;
double y;
double sum =0;
double minus =0;
double times =0;
double divide =0;
double nCr =0;
String Op;
System.out.print("X: ");
x = keyboard.nextDouble();
System.out.print("Y: ");
y = keyboard.nextDouble();
System.out.print("Op: ");
Op = keyboard.nextLine();