X269: Recursion Programming Exercise: Sum of the Digits

For function sumOfDigits, write the missing recursive call. This function takes a non-negative integer and returns the sum of its digits.

Examples:

sumOfDigits(1234) -> 10

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.