Is there anyway in java which can help me set two values/variables based on a condition or set of conditions? eg: I want to do the following:
List