For this Question: Given a number N, find the sum of all the digits of the number

Note: Use a recursive method to solve this problem.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b>Sum()</b> that takes the integer N as a parameter.

Constraints: 
1 ≤ T ≤ 100
0 ≤ N ≤ 1000000000Return sum of digits.Sample Input 
2
25
28

Sample Output 
7
10, I have written this Solution Code:   static long  Sum(long  n) 
    { if(n==0){return 0;}

return n%10+Sum(n/10);

 
    } , In this Programming Language: Java, Now tell me if this Code is compilable or not?