title: getting error NullPointerException in Java
body: <p>i am getting error Java.lang.NullPointerException..i am beginner in java please help on this.....i am running this code in Netbeans</p>
  
  <pre><code>if ((cmbDate.getSelectedItem().equals("")) &amp;&amp;  (cmbMonth.getSelectedItem().equals("")) &amp;&amp; (cmbYear.getSelectedItem().equals(""))) {
             JOptionPane.showMessageDialog( this, "Please select DOB","Error", JOptionPane.ERROR_MESSAGE);
             return;
              }
  </code></pre>