34,333
edits
Changes
→A switch Statement Example
}
</pre>
== Explaining the Example ==
When compiled and run the sample application will prompt for a car model. Once entered the response is assigned to the ''carModel'' string variable which in turn is used as the governing variable in the ''switch'' statement. As is the case with the ''Jeep'' manufacturer, case statements may be grouped together preceding a single set of statements.
The ''default'' option