title: void type not allowed here (java) (s != null)
body: <p>I have this code, it says void type not allowed here (where I put the //error comment)
  When I delete the &amp;&amp;..... it wont give the error</p>
  
  <pre><code>public void actionPerformed(ActionEvent ae) {
  if (ae.getSource() == ok) {
      Contact nweC = null;
  
  
      String vnm = tfVoor.getText();
      String anm = tfAchter.getText();
      String em = tfEmail.getText();
      if (em.trim().length() &gt; 0 &amp;&amp; !hetBoek.heeftContact(em)) {
          nweC = new Contact(vnm, anm, em);
      } else {
          tfEmail.setText("");
          JOptionPane.showMessageDialog(null, "Onjuist emailadres", "Mislukt", JOptionPane.PLAIN_MESSAGE);
      }
      //error if (nweC != null &amp;&amp; hetBoek.voegContactToe(nweC)) {
                  JOptionPane.showMessageDialog(null, "Toevoegen gelukt", "Succes", JOptionPane.PLAIN_MESSAGE);
      }
  } else if (ae.getSource() == cancel) {
      tfVoor.setText("");
      tfAchter.setText("");
      tfEmail.setText("");
  } else if (ae.getSource() == toon) {
      String s = hetBoek.toString();
      JOptionPane.showMessageDialog(null, s, "Druk op OK",
      JOptionPane.PLAIN_MESSAGE);
  }
  }
  </code></pre>
  
  <p>I hope someone can help me! thanks</p>