switch statements
You will not be tested on switch statements and the material on this page will not be covered on the AP Computer Science exam.
Objective #1: Be able to use the switch statement.
switch (characterEntered)
{
case 'A':
System.out.println("You entered
an
A");
break;
case 'B':
System.out.println("You entered a B");
break;
default:
System.out.println("Illegal entry");
break;
}