title: How to split a number & add those number split numbers ? Below is the code for splitting the numbers but unable to add up those nodes
body: <p>Below is the code for splitting the numbers but unable to add up those nodes</p>
  <pre><code>public class Demo {
  
      public static void main(String[] args) {
  
          int num = 55;
          int j;
          String number = String.valueOf(num);
          for (int i = 0; i &lt; number.length(); i++) {
              j = Character.digit(number.charAt(i), 10);
              System.out.println(j);
  
          }
          System.out.println();       
     }
  }
  </code></pre>