Hi guys, pls gimme a hint.
package en.codegym.task.pro.task04.task0410;
import java.util.Scanner;
/*
Second smallest number entered
*/
public class Solution {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int min = Integer.MAX_VALUE;
int max = Integer.MIN_VALUE;
while (scanner.hasNextInt()){
int x = scanner.nextInt();
if ( x < min ) {
min = x;
} else {
max = x;
}
}
if (min < max){
min = max;
}
System.out.print(min);
}
}