Skip to content

Instantly share code, notes, and snippets.

@tagrudev
Last active December 31, 2015 17:48
Show Gist options
  • Save tagrudev/8022279 to your computer and use it in GitHub Desktop.
Save tagrudev/8022279 to your computer and use it in GitHub Desktop.
How can I use array for a case value in a switch statement ?
boolean[] values = new boolean[4];
values[0] = true;
values[1] = false;
values[2] = false;
values[3] = true;
switch (values) {
case [true, false, true, false]:
break;
case [false, false, true, false]:
break;
default:
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment