All > Technology > Programming > Java
A selection statement in which the value of an arithmetic expression {expression!arithmetic} is compared for a match against different case labels. If no match is found, the optional default label is selected For instance
switch(choice){ case 'q': quit(); break; case 'h': help(); break; ... default: System.out.println("Unknown command: "+choice); break; }
- Browse Related Terms: Break, break statement, CASE, case label, case sensitive, continue, Default, default label, else, if, JSP scripting element, switch, switch statement
Also listed in:
- All > Technology > Programming > Perl