I know this not going to compile and run at this point. However is the switch statement right? I did get a compiler error of: class, interface, or enum expected
public class Fruit
{
public static void main(String[] args)
{
String choice = " ";
switch(choice)
{
case " A ": System.out.print(" Apple");
break;
case " K ": System.out.println("Kiwi");
break;
case " P ": System.out.println("Pear");
break;
default: System.out.println("incorrect choice");
}
}
}