title: I want to add up the number which is coming in the string.Can anyone please tell me the program in JAVA?
body: <p>Example:
  Input:
  String s = "My favorite pet 43 is 12 cat 32 "</p>
  
  <p>Output:
  Number = 43+12+33 = 88</p>
  
  <p>How can we generate the output?</p>