I have some boolean variables which will be passed as arguments
boolean var1;
boolean var2;
boolean var3;
boolean var4;
Depending on these variables, I have to code something like this
if (var1 && !var2 && !var3 && !var4) {
//do something
}
elsif (var1 && var2 && !var3 && !var4) {
//do something
}
. . . and so on.. using all the possible combinations. I can do this using if-else statement. Need to know is there some better approach. Thanks in advance.