You can't take the data already formatted, but you can input the data as a String and format at.
Take a look at NumberFormat for formatting the number.
If you want to get each digit from a string, try getting the char from the String for each number, and then convert it to an Integer
or an int
.