you can use .length() to determine how many digits and .charAt() to isolate the numbers and add them using a for loop.