int (String unknown) { String known = "abc"; final int switchResult = switch (known) { case "foo": case "bar": yield 0; default: if (unknown.length() <= 0) { throw new IllegalArgumentException(); } else if (unknown.equals("true")) { yield 12; } else { yield 18; } }; return switchResult; }