public class Homework05 {
boolean test (int a){
if(a%2==0){
return true;
}else{
return false;
}
}
}
import java.util.Scanner;
public class Main05 {
public static void main(String[] args){
Homework05 m= new Homework05();
Scanner s = new Scanner(System.in);
System.out.println("a=");
int a=s.nextInt();
boolean boo =m.test(a);
if(boo){
System.out.println("输入的是偶数");
}else{
System.out.println("输入的是奇数");
}
}
}