For this Question: Given a number N, you need to check whether the given number is <b>Palindrome</b> or not. A number is said to be Palindrome when it reads the same from backward as forward.User task:
Since this is a functional problem you don't have to worry about the input. You just have to complete the function <b>isPalindrome()</b> which contains N as a parameter.

<b>Constraints:</b>
1 <= N <= 9999You need to return "true" is the number is palindrome otherwise "false".Sample Input:
5

Sample Output:
true

Sample Input:
121

Sample Output:
true, I have written this Solution Code: static boolean isPalindrome(int N)
    {
        int sum = 0;
        int rev = N;
        while(N > 0)
        {
            int digit = N%10;
            sum = sum*10+digit;
            N = N/10;
        }
       if(rev == sum)
         return true;
         else return false;
    }, In this Programming Language: Java, Now tell me if this Code is compilable or not?