In this tutorial, we will write a java program to break an input integer number into digits. For example if the input number is 912 then the program should display digits 2, 1, 9 along with their position in the output. Java Example to break integer into digits. Here we are using Scanner class to get the input from user.ASCII stands for American Standard Code for Information Interchange. Computers can only understand numbers, so an ASCII code is the numerical representation of a character such as 'a' or '@' or an action of some sort. ASCII was developed a long time ago and now the non-printing characters are rarely used for their original purpose. Note: we write "3 Cubed" as 3 3 (the little 3 means the number appears three times in multiplying). Cubes From 0 3 to 6 3 If you need a string array, then simply convert the number to a string and grab its characters with the charAt() method (or substring()) of the String class. Else, you need to use divison by 10 repeatedly to find the digit values (for example, 34567 / 10000 = 3, then go on with the rest, 4567 / 1000 = 4, and so on). Program to Find Sum of Digits in Java using For Loop This program for the sum of digits in java allows the user to enter any positive integer. Then it will divide the given number into individual digits and adding those individuals (Sum) digits using Java For Loop.