如图所示
if(0==one%2) System.out.println("one是偶数“);
public class HelloWorle{
public static void main(String[]args){
int one =20;
if(a%2==0){
System.out.println("one是偶数");
}
one 对2取余数,若余数为0,则为偶数