In this tutorial we have explored two different ways to write a program in java to find the sum of digits in a given integer. In the first program we have used traditional approach and in second we have used java 8.