When I try to run the program it gives me an error that plainPizza has not been initialized.
I already tried to initialize it outside its loop with plainPizza = getPlain() but I do not want the getPlain method to repeat (which is what happened when I did that). I just want it go straight to the checkOut method.
Here is what my code looks like right now:
`
int plainPizza, customerOption;
System.out.println("Enter 2 to order or 1 to exit: ");
customerOption = keyboard.nextInt();
while (customerOption != 1)
{
plainPizza = getPlain();
System.out.println("Enter 2 to order or 1 to exit: ");
customerOption = keyboard.nextInt();
}
checkOut(plainPizza);
}`