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.First line consists of a single integer denoting n.

Constraint:-
1<=size of n<=100Output 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) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String str=br.readLine();
		int i=str.length()-1;
		if(i==0){
			int number=Integer.parseInt(str);
			System.out.println(number);
		}else{
			while(str.charAt(i)=='0'){
				i--;
			}
			for(int j=i;j>=0;j--){
				System.out.print(str.charAt(j));
			}
		}
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?