can any shed some light on this?
package en.codegym.task.pro.task04.task0410;
import java.util.Scanner;
/*
Second smallest number entered
*/
public class Solution {
public static void main(String[] args) {
//write your code here
Scanner sc = new Scanner(System.in);
int min = sc.nextInt();
int secondMin = Integer.MAX_VALUE;
while(sc.hasNextInt()){
int x = sc.nextInt();
if(x<=min){
min=x;
}else if(x<secondMin){
secondMin=x;
}
}System.out.println(secondMin);
}
}