title: Why am I getting Error: identifier expected
body: <p>My code is as follows. This is a school project and I am required to do this without using <code>else</code> statements. I don't understand why I'm getting errors including:</p>
  <pre><code>Main.java:16: error: ';' expected
      public static boolean isLeapYear( int testYear )
                                                      ^
  Main.java:22: error: illegal start of type
                  if(isLeapYear == false)
                  ^
  Main.java:22: error: &lt;identifier&gt; expected
                  if(isLeapYear == false)
                               ^
  </code></pre>
  <p>Code:</p>
  <pre><code>import static java.lang.System.out;
  public class Main {
      public static void main(String args[]) { 
  
          //do not change any of the next 3 lines 
          Scanner keyboard = new Scanner(System.in);
          System.out.print(&quot;Enter a year :: &quot;);
          int year = keyboard.nextInt();
  
          if (isLeapYear == true) {
              return isLeapYear + &quot; is a leap year&quot;;
          }
          if (isLeapYear == false) {
              return isLeapYear + &quot; is not a leap year&quot;;
          }
  
      }
      public static boolean isLeapYear(int testYear)
      {
          //you will use the % operation to determine if  
          //testYear is a leap year. 
  
          int year = testYear;
          boolean isLeapYear = false;
  
          if (year % 4 == 0) {
              isLeapYear = true;
          }
          if (year % 4 != 0) {
              isLeapYear = false;
          }
  
          return isLeapYear;
      }
  }
  </code></pre>