In java, We use “switch case” when we have large list of conditions because “if then else if” is much slower compare to “switch case” so I request niotron team to add it.
I don’t know if it is already available in niotron but I didn’t find it.
If you don’t understand what i mean then here is one example
Using if then else if
if (value == 1 {
//statement
} else if (value == 2) {
//statement
} else if (value == 3) {
//statement
}
Using switch cases
switch (value) {
case 1:
//statement
break;
case 2:
//statement
break;
case 3:
//statement
break;
I hope you understand what I mean and sorry for my bad english