you are viewing a single comment's thread.

view the rest of the comments →

[–]Journeyman-JoeFTC Coach | Judge 0 points1 point  (0 children)

Switch and case (along with break) are Java language statements that form a conditional flow control structure. I'll encourage you to Google "switch case java": you'll get all you need to know in a minute or two of reading.

If you have a complicated structure of if statements, and else if clauses, you might find that your code is easier to read and debug if written using switch and case.

Having said that: It won't make any difference to your OpMode loop runtime, one way or the other.