title: How do you compare characters in java?
body: <p>How do you compare characters (like Strings, such as variable.equals(a))?  Also, what am I doing wrong in this line of code:</p>
  
  <pre><code>    char num[] = new char[10];
      char num[0] = ' ';
      char num[1] = ' ';
      char num[2] = ' ';
      char num[3] = ' ';
      char num[4] = ' ';
      char num[5] = ' ';
      char num[6] = ' ';
      char num[7] = ' ';
      char num[8] = ' ';
      char num[9] = ' ';
  </code></pre>
  
  <p>I'm trying to make a array of characters, but it's giving me an error message.</p>