title: 3 conditions in one if statement
body: <p>This program is supposed to check if the entered year is a leap year or not. But I'm already running into errors while compiling.
  The formula to check if it's a leap year or not is the following:</p>
  
  <blockquote>
    <p>If you can divide the year by 4 it's a leap year...</p>
    
    <p>unless you can at the same time also divide it by 100, then it's not a
    leap year...</p>
    
    <p>unless you can at the same time divide it by 400 then it's a leap
    year.</p>
  </blockquote>
  
  <pre><code>public class Schaltjahr {
      public static void main (String[] args) {
          double d;
          String eingabe;
          eingabe = JOptionPane.showInputDialog("Gib das Jahr ein "); //Type in the year
          d = Double.parseDouble(eingabe);
          if ((d % 4 == 0) &amp; (d % 100 == 0) &amp;&amp; (d % 400 = 0) ) {
              JOptionPane.showMessageDialog(null,"Es ist ein Schaltjahr"); //It is a leap year
          } else {
              if ((d % 4 == 0) &amp; (d % 100 == 0) )) {
                  JOptionPane.showMessageDialog(null, "Es ist kein Schaltjahr"); //It is not a leap year
              }
          } else {
              if (d % 4 == 0) {
                  JOptionPane.showMessageDialog(null, "Es ist ein Schaltjahr"); // It is a leap year
              }
          }
      }
  }
  </code></pre>
  
  <p>While compiling i get this error:</p>
  
  <pre><code>Schaltjahr.java:16: error: illegal start of expression
               if ((d % 4 == 0) &amp; (d % 100 == 0) )) {
                                                  ^
  Schaltjahr.java:19: error: 'else' without 'if'
           } else {
             ^
  2 errors
  </code></pre>