title: method that will return true if there is no digit in code
body: <pre><code> package code;
   public class WriteUp{
  
   public boolean containsNoDigits(String s){
      s  = s.toLowerCase();
      char[] n = {'0', '1', '2', ....., '9'} //i wrote out 0-9
      for (int i = 0; i &lt; s.length(); i++){
              char c = s.charAt(i);
              if (c == n[i]);
                    return false; //if string contain digit
      }
      return true; //if string contain NO digit
   }
   }
  </code></pre>
  
  <p>I want to write a method (using Array) to check if my string contain a digit or not. digit => false; no digit => true;</p>
  
  <p>my code fail to pass both the JUnit test</p>
  
  <p>JUnit Test:</p>
  
  <pre><code>  @Test
    public void test(){
          code.WriteUp wu = new code.WriteUp();
          boolean expected = true;
          boolean actual = wu.containsNoDigits("there is no digit")
          assertTrue("", expected ==actual);
    }
  
    @Test
    public void test01(){
          code.WriteUp wu = new code.WriteUp();
          boolean expected = false;
          boolean actual = wu.containsNoDigits("there are digit, 0342432")
          assertTrue("", expected ==actual);
    }
  </code></pre>
  
  <p>How can I fix the code so that it will work correctly </p>