0
Who can tell me what is the problems with this code?
public class Program{ public static void main(String[] args) { String opp ="Out"; switch(opp) { case "Out" : System.out.println("OWWWWW!"); break; case "In"ïŒ System.out.println("DDd"); break; } } } Why it cannot run and said that it has 3 error? ..\Playground\:9: error: : expected case "In"â©âĂ ^ ..\Playground\:9: error: illegal character: '\u00bc' case "In"â©âĂ ^ ..\Playground\:10: error: ';' expected System.out.println("DDd"); Thanks
2 Answers
0
problem solved:
public class Program{
public static void main(String[] args) {
String opp ="Out";
switch(opp) {
case "Out" :
System.out.println("OWWWWW!");
break;
case "In":
System.out.println("DDd");
break;
}
}
}
0
You have a wrong encoding colon character after "In". Replace it will produce correct answer.