我试图检查一个数字是否可以被另一个整除,目前我使用这种方法:
int x = 70; int y = 30; if(x/y == Math.round(x/y)) { ... }
有没有更简单的方法?
java division
division ×1
java ×1