【发布时间】:2018-11-24 02:57:08
【问题描述】:
我想要多个这样的值:
if (currentScore == 10 | currentScore == 20 | currentScore == 30 | currentScore == 40 | currentScore == 50 | currentScore == 60
| currentScore == 70 | currentScore == 80 | currentScore == 90 | currentScore == 100 | currentScore == 110
| currentScore == 120 | currentScore == 130 | currentScore == 140 | currentScore == 150 | currentScore == 160
| currentScore == 170 | currentScore == 180 | currentScore == 190 | currentScore == 200) {
editor.putInt("TOP_LEVEL", topLevel + 1);
editor.apply();
}
如何简化该代码以便计算许多 currentScore。 谢谢
【问题讨论】:
标签: java android multiplication