title: How do I print out the value of this boolean? (Java)
body: <p>I have tried a few different methods, like print(boolean isLeapYear) and a few others, but I can not figure out how to get it to work. It always says that I have a missing class (boolean is primitive, does it need one?) Anyways, If the isLeapYear if-else statements are wrong, I'm not worried about those.. I just need to figure out how to print out the value of the boolean; any help / point in the right direction is greatly appreciated =]</p>
  
  <pre><code>import java.util.Scanner;
  
  public class booleanfun    {
      boolean isLeapYear;
  
      public static void main(String[] args)
      {
          System.out.println("Enter a year to determine if it is a leap year or not: ");
          Scanner kboard = new Scanner(System.in);
          int year = kboard.nextInt();
      }
  public boolean isLeapYear(int year)
    {
      if (year % 4 != 0)
          isLeapYear = false;
  
      else if ((year % 4 == 0) &amp;&amp; (year % 100 == 0))
          isLeapYear = false;
  
      else if ((year % 4 == 0) &amp;&amp; (year % 100 == 0) &amp;&amp; (year % 400 == 0))
          isLeapYear = true;
  
      else
          isLeapYear = false;
  
  System.out.println(isLeapYear);
  System.out.println(boolean isLeapYear);
  
      return isLeapYear;
      }
  }
  </code></pre>