Last active
December 31, 2015 17:48
-
-
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 ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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