Answer:
Take a String.
Convert it into array of characters.
Apply for loop till length of char array.
Using isDigit() method we can check the digits in string.
If isDigit() will return true then print that index value.
That digit is in char form. ...
Using sum variable, we will sum it.
Explanation: