0

I am getting a error of orphaned case

import java.util.*; class Curryleaf { public static void main(String args[]) { Scanner in=new Scanner(System.in); int vstr, tvstr=0,nvstr, tnvtr=0, vfd, tvfd=0, rate, nvfd, tnvfd=0, fd,tfd=0,amt=0, tamt=0, tamt1=0, tamt2=0,totald=0,damt=0,ch; double gst=0,tot,gtotal; String str="",choice,choice1="Y"; System.out.println("Welcome To The Best South-India Resturent - CurryLeaf"); System.out.println("Starter Corner: 1"); System.out.println("Main Course: 2"); System.out.println("Deserts: 3"); System.out.println(); while(choice1.equalsIgnoreCase("Y")) { System.out.println("Enter For Starter"); System.out.println("Enter For Main Course"); System.out.println("Enter For Deserts"); System.out.println(); System.out.println("Enter Your Choice"); ch=in.nextInt(); { case 1: System.out.println("Welcome to Starter Menu"); System.out.println("Enter'VS' for Veg Starter and'NVS' for Non-Veg starter"); str=in.next(); if(str.equalsIgnoreCase("VS")) { System.out.println("Starter\t\t\tPrice in Rs."); System.out.println("1. Panner Tikka\t\t\t\t120"); System.out.println("2. Crispy Mchurian\t\t\t\t190"); choice="Y"; while(choice.equalsIgnoreCase("Y")) { System.out.println("Choose the starter menu by entering the number"); vstr =in.nextInt(); System.out.println("Enter the quantity"); tvstr =in.nextInt(); if(

21st Sep 2019, 3:00 PM
Devesh Mishra
Devesh Mishra - avatar
2 Answers
+ 1
In the last write full if statement
21st Sep 2019, 3:21 PM
Prathvi
Prathvi - avatar
0
you forgot to type switch.
21st Sep 2019, 3:18 PM
Taste
Taste - avatar