title: Java if statements
body: <p>is there something wrong with this if statement i am trying to make a swing login system??? thanks :)</p>
  
  <pre><code> public void login()
      {
             String username = loginField.getText();
             char[] password = loginPass.getPassword();
             if (username.equals("test") &amp;&amp; password.equals("test"))
             {
                      System.out.println("logged in");
             }
      }
  </code></pre>