почему не получается решить таким способом?
package com.javarush.task.pro.task04.task0410;
import java.util.Scanner;
/*
Второе минимальное число из введенных
*/
public class Solution {
public static void main(String[] args) {
Scanner console = new Scanner(System.in);
int num = Integer.MIN_VALUE;
while (console.hasNextInt());
{
int x = console.nextInt();
int y = console.nextInt();
if ( x > y && x > num ) {
num = x;
}
else if ( y > x && y > num ) {
num = y;
}
}
System.out.println(num);//напишите тут ваш код
}
}