А где ошибка?
Можете помочь.
package com.javarush.task.pro.task04.task0408;
import java.util.Scanner;
/*
Максимум из введенных чисел
*/
public class Solution {
public static void main(String[] args) {
Scanner em = new Scanner(System.in);
int max = Integer.MIN_VALUE;
int min = Integer.MAX_VALUE;
int b=0;
while (em.hasNextInt()) {
int a = em.nextInt();
if ((a % 2) == 0) {
if (a > max) {
max = a;
}
}
if ((a % 2) != 0) {
if (min > a) {
min = a;
b=min;
}
}
}
if(max>0 & b>0) {
System.out.println(max);
}else
System.out.println(min);
}
}