Like If-Statements Switch-Statements are used to control the flow of your program. They are often used, if there are many different cases to account for. Sometimes Switch-Statements can be faster, because the compiler can try to optimize the code with binary search or jump tables. However it is not guaranteed that these techniques work on your code.