For this Question: Given a number, you task is to reverse its digits. If the reversed number contains 0s in the beginning, you must remove them as well.Functional problem, Number is the input

Constraint:-
1<=size of n<=100000Output is a single line containing reversed number n.Sample Input
123445

Sample Output
544321

Sample Input
16724368

Sample Output
86342761, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(reverseDigits(n));
	}

	static int reverseDigits(int num)
    {
        int rev_num = 0;
        while (num > 0) {
            rev_num = rev_num * 10 + num % 10;
            num = num / 10;
        }
        return rev_num;
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?