Many choices, one clean switch
A long else if chain is hard to read. switch lines the choices up, runs only the one that matches, and never slides into the next case by accident.
A long else if chain is hard to read. switch lines the choices up, runs only the one that matches, and never slides into the next case by accident.