I can\'t seem to find a straight forward yes or no to this in my searching. In Android, is there a way to use a conditional statement in case-switch? For example, with age being
It is not possible. Instead, Try this minimalist approach
age > 79 ? first_case_method() : age > 50 ? second_case_method() : age > 40 ? third_case_method() : age > 30 ? fourth_case_method() : age > 20 ? fifth_case_method() : ... : default_case_method();