Specifications

Sun Services
Java™ Programming Language
Module 4, slide 23 of 31
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Switch Statements
This switch statement is equivalent to the previous example:
switch ( carModel ) {
case DELUXE:
addAirConditioning();
case STANDARD:
addRadio();
default:
addWheels();
addEngine();
}
Without the break statements, the execution falls through
each subsequent case clause.