In this tutorial, we will learn how to find the sum of all digits of a number in Java. Algorithm we are using is as below :.