示例

public class ClassA {
int i;
int j;
public void methodA {

j= i % 1;

}

}
解决方案 因为结果将始终为 0,所以请重新考虑取余数表达式的使用。