Could someone show me what i'm doing wrong, this part of code should scan for name of restaurant, menu name and names of menu items and their prices, but it's giving me some sort of exception, also it seems to skip completely the first scan, just jumps to second, ideally it should scan for 1 resturant that has 1 menu and that contains 2 menu items with their names and prices
String newRestaurant, newMenu;
String[] newMenuItem = { "", "" };
double[] price = {0.0, 0.0};
int x = 0;
System.out.println("---------------------------------------");
System.out.println("CREATE A RESTAURANT, MENUS, and MENU ITEMS:");
System.out.println("Please input the name of the new Restaurant:");
newRestaurant = scan.nextLine();
System.out.println("What is the name of the Menu you wish to create (type 'none', if you are done):");
newMenu = scan.nextLine();
if (newMenu == "none") System.out.println("Saving entry...");
else {
System.out.println("What is the name of the Menu item you wish to create (type 'none', if you are done):");
newMenuItem[x] = scan.nextLine();
if(newMenu != "none") {
System.out.println("What is the price?");
price[x]= scan.nextDouble();
x++;