What to do with Default Switch State?

Your switch-case should have this structure:

switch (expression)  {
    case constant1:
        // code
        break;

    case constant2:
        // code
        break;
        .
        .
        .
    default:
        break;
}
1 Like