title: Adding numbers in String while ignoring its letters
body: <p>folks.. I need to get <code>String</code> input from a user and add its <code>numeric values</code> only and ignore <code>letters</code>. For example, if a user enters <code>75Number5</code> the result should be <code>80</code> or <code>800dadsadasdwwfvv0002</code> and the result should be <code>802</code>. But I'm constantly getting <code>0</code>. </p>
  
  <pre><code>import java.util.Scanner;
  
  public class NumberAddition {
  
      public static void main(String[] args)
      {
          Scanner kbd = new Scanner(System.in);
  
          System.out.println("Enter any String: ");
          String myString = kbd.nextLine();
          myString = myString.toLowerCase();
          int result = 0;
  
          for(int i = 0; i &lt; myString.length(); i++)
          {
              if(myString.charAt(i) != '1' || myString.charAt(i) != '2' ||
                      myString.charAt(i) != '3' || myString.charAt(i) != '4' ||
                      myString.charAt(i) != '5' || myString.charAt(i) != '6' ||
                      myString.charAt(i) != '7' || myString.charAt(i) != '8' ||
                      myString.charAt(i) != '9')
              result += 0;
              else 
                  result += myString.charAt(i);
          }
  
          System.out.println("The result is " + result);
      }
  }
  </code></pre>