Another question, this time regarding breaking a string down for validity
<p>Thanks a bunch for the tip on the static to all of you folks who answered!  Feeling a little less frustrated now.</p>

<p>I am not going to ask questions step by step through my whole assignment, but I want to make sure that this is the way to go about one of the next tasks. I have written the following, which compiles fine (the purpose is to check the string to make sure that it is numeric, and the user may have also entered the ISBN as a number with or without dashes):</p>

<pre><code>     private String validateISBN(String bookNum)
   {
      String[] book;
      int j=0;
      for ( int i=0;i&lt;bookNum.length();i++)
        if (character.isDigit(bookNum.charAt[i]))
          bookNum.charAt[i]=book[j];j++;
</code></pre>

<p>I haven't written the next part, which has to allow for an X as the last digit in the string (which is apparently how ISBN numbers work).  I would assume that if the above is correct (or close), that all i need to do is check that the ninth character is a digit or an X, by writing something like:
       if book[9] isDigit() || if book[9] == "x" || if book[9] == "X";</p>

<p>Is that about right (ISBN numbers are always 10 numbers or 9 numbers and an X at the end)?</p>
