public class RevereseNum { public static void main(String[] args) { int n, reverse = 0; System.out.println("Enter an integer to reverse"); Scanner in = new Scanner(System.in); n = in.nextInt(); while (n != 0) { reverse = reverse * 10; reverse = reverse + n % 10; n = n / 10; } System.out.println("Reverse of the number is " + reverse); This code requests the input of a number in the console, and then turns the numbers in reverse order, but I do not understand how this happens? Those. How does the number flip through this loop? Isn't the loop endless in this case?