title: Creating an isValid method
body: <p>I am working on a mini assignment for a Com. Science class, it is a beginner class, but I have no prior coding experience, so I am struggling with even the basics. I will be asking multiple questions, I do apologize. We are being asked to create a method to move through all of the characters of a string to see if they are A G C or T.</p>
  
  <pre><code>/**
   *  Determines whether all characters in this strand are valid
   *  ('A', 'G', 'C', or 'T')
   * @return true if all characters are valid, false otherwise
   */
  public boolean isValid() {
  </code></pre>
  
  <p>In a lab for the class we are given this:</p>
  
  <pre><code>private static int countP(String s) {
      int count = 0;
      int i = 0;
      while (i &lt; s.length())
      {
          if (isLetterP(s.charAt(i)))
          {
              count += 1;
          }
          i += 1;
      }
      return count;
  }
  </code></pre>
  
  <p>I know I have to use the above, I came up with this so far:</p>
  
  <pre><code>public boolean isValid() {
      int i = 0;  
      while (i &lt; DNA.length()) {
          if (isValid(DNA.charAt(i)))
          {
              return false;
          }
          i = i + 1;
      } 
      return true;
  }
  </code></pre>
  
  <p>I know I have to work on the if (isValid(DNA.charAT(i) ))[ line, but I am lost, I am not really sure what I need to do. If anyone can not give me the answer flat out but help guide me, that would be awesome.</p>