結果 : how to avoid too many if else in java