結果 : how to avoid multiple if else statement in java