this part of code should load name of restoraunt, then menu name, then meal name and price but when i run it, it takes in all the names and then when it finally comes to price, i input for example 7.2 and get input mismatch exception
String newMenu = "";
String newRestaurant = "";
String[] newMenuItem = new String[10];
double[] price = new double[10];
int x = 0;
while (!(newMenu.equals("none"))) {
System.out.println("What is the name of the Menu you wish to create (type 'none', if you are done):");
newMenu = scan.next();
if (newMenu.equals("none")) {
System.out.println("Saving entry...");
continue;
} else {
System.out.println("What is the name of the Menu item you wish to create (type 'none', if you are done):");
newMenuItem[x] = "end";
while (!(newMenuItem[x].equals("none"))) {
newMenuItem[x] = scan.next();
if (!(newMenuItem[x].equals("none"))) {
System.out.println("What is the price?");
price[x]= scan.nextDouble();
x++;
}
}
}
}