+ 10

I had Scanner error . Could you help me?

import Scanner.*; public class Program { public static void main(String[] args) { Scanner sc=new Scanner(); System.out.println("Choose Language H for Hindi,M for Myanmar and E for English"); String st=sc.nextLine(); switch (st){ case 'H':System.out.println("app ko iss page main swargat hai");break ; case 'M':System.out.println("Mingalar bar lu gyi min ko di page ma koso bar tat");break ; case'E':System.out.println("Welcom e to this Page");break ; default :System.out.println ("Sorry Try Again"); } } }

25th May 2020, 10:22 AM
Nisha Agrawal
Nisha Agrawal - avatar
5 Réponses
25th May 2020, 10:43 AM
ABHISHEK
ABHISHEK - avatar
+ 7
It looks like you publish your question twice? If so, please delete the duplicate. Thanks
25th May 2020, 10:25 AM
Lothar
Lothar - avatar
+ 5
Thank you so much Abishek
25th May 2020, 10:47 AM
Nisha Agrawal
Nisha Agrawal - avatar
+ 4
Hey I just want to answer quickly. That's why I uploaded duplicate post
25th May 2020, 10:42 AM
Nisha Agrawal
Nisha Agrawal - avatar
+ 3
If you understand what was your error in code that would be a pleasure for me keep learning!!
25th May 2020, 10:50 AM
ABHISHEK
ABHISHEK - avatar