title: How can I compare a string and a char array in Java?
body: <p>In my program I'm trying to compare my char array <code>asterixA[]</code> to a String <code>word</code> in an if condition like:</p>
  <pre><code>if (word.equals(asterixA))
  </code></pre>
  <p>but it's giving me an error. Is there any other way I can compare them?</p>