For this Question: Given an integer N, your task is to print the sum of its digits.<b>User Task</b>
Since this is a functional problem, you don't have to worry about the input. You just have to complete the function <i>SumOfDigits()</i> which contains the given number N.

<b>Constraints:</b>
1 <= N <= 10<sup>5</sup>

<b>Note:</b> 
<i>But there is a catch here given user function has already code in it which may or may not be correct, now you need to figure out these and correct if it is required</i>Return the sum of its digits.Sample Input:-
12

Sample Output:-
3

Sample Input:-
99

Sample Output:-
18, I have written this Solution Code: static int SumOfDigits(int N)
	{
	    int sum = 0;
        while(N >0)
        {
            sum+= N%10;
            N = N/10;
        }
        return sum;
	}, In this Programming Language: Java, Now tell me if this Code is compilable or not?