I'm having trouble with a switch statement
Scanner scan = new Scanner (System.in);
char chars = scan.nextLine();
System.out.println("A Andorra\n" +
"B Belgium\n" +
"F Finland\n" +
"M Malta\n" +
"S Slovenia\n\n" +
"Choose a country from menu above:\n" + chars);
switch (chars)
{
case 'A':
System.out.println("You chose \"Andorra\"");
break;
case 'B':
System.out.println("You chose \"Belgium\"");
break;
case 'F':
System.out.println("You chose \"Finland\"");
break;
case 'M':
System.out.println("You chose \"Malta\"");
break;
case 'S':
System.out.println("You chose \"Slovenia\"");
break;
default:
System.out.println("That country is not on the list\n");
}
but i'm getting an error saying that the char is an incompatable type. i'm new to java and don't understand y