Skip to content

Instantly share code, notes, and snippets.

@MarkyC
Forked from rzwitserloot/switches.java
Last active February 10, 2016 15:53
Show Gist options
  • Select an option

  • Save MarkyC/dc1a68195f3e771fe388 to your computer and use it in GitHub Desktop.

Select an option

Save MarkyC/dc1a68195f3e771fe388 to your computer and use it in GitHub Desktop.
// Don't do this:
switch (foo) {
case 5:
x = "Hello";
break;
case 10:
x = "Hi";
break;
}
// But do this:
switch (foo) {
case 5:
x = "Hello";
break;
case 10:
x = "Hi";
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment