I am very new to coding, have only completed a few hours of YouTube videos to learn thus far. I am trying to complete a practice code and am facing some trouble.
I have attached a part of the code below. When I am entering value in (10,12,14, and 16) the code is still responding with "Wrong Response". In addition to this the following line is not properly functioning. It is not giving me the option to select a crust type. Please let me know if anyone has any suggestions. Crust problem:
System.out.println("What type of crust would you like? ");
System.out.print("(H)and-tossed, (T)hin-crust, or (D)eep-dish: ");
crust = keyboard.nextLine();
Int Value problem:
if ( size.equals(" 10 ")) {
pizzaPrice = SM_Price;
} else if ( size.equals(" 12 ")) {
pizzaPrice = MED_Price;
} else if ( size.equals(" 14 ")) {
pizzaPrice = LG_Price;
} else if (size.equals(" 16 ")) {
pizzaPrice = XL_Price;
}
else { System.out.println("Wrong repsonse. ");
Thank you.