Java Program to find Sum of Digits

2387 views.

Recursion in Java

Recursion in java is a process in which a method calls itself continuously. A method in java that calls itself is called recursive method.

It makes the code compact but complex to understand.

1. Java Program to find sum of digits without using recursion.

OutPut

2. Java Program to find sum of digits using recursion.

Output

 

Leave a Reply