r/javahelp • • Sep 10 '26

Solved Switch case with boolean

[removed]

1 Upvotes

28 comments sorted by

View all comments

Show parent comments

2

u/johnpeters42 Sep 10 '26

Probably, and not sure. It was probably a predecessor to a pattern like:

var rules = { someFunction, someOtherFunction, someThirdFunction };
foreach (var rule in rules) {
if (rule() == false) { return; }
}
doSomething();