title: Java Converting: char[] array --> String
body: <p>How do you convert a character array to a String?
  <br/>
  I have this code</p>
  
  <pre><code>Console c = System.console();
  if (c == null) {
      System.err.println("No console.");
      System.exit(1);
  }
  char [] password = c.readPassword("Enter your password: ");
  </code></pre>
  
  <p>I need to convert that to a String so I can verify <br></p>
  
  <pre><code>if(stringPassword == "Password"){
      System.out.println("Valid");
  }
  </code></pre>
  
  <p>Can anyone help me with this?</p>