title: Return boolean in java?
body: <p>I need help on this question.</p>
  
  <p>"Inside the ChkNum class,the method inEven()return if the value that it is passed "
  is Even.It return false that is odd.Therefore isEven()has a return type of boolean."</p>
  
  <p>also those line below cannot be changed.</p>
  
  <pre><code>if(e.inEven(10))System.out.println("10 is even");
  
  if(e.inEven(9))System.out.println("9 is even");
  
  if(e.inEven(8))System.out.println("8 is even");"
  </code></pre>
  
  <p>i am a beginner in java. 
  I try to finish this question like the following program.Anyway, it doesn't work.=(
   What was I doing wrong?</p>
  
  <pre><code>public class ChkNum{
  
  boolean inEven=true;
  
  public boolean inEven(int o)
  {   
      if ((o%2)==0) { inEven = true;} 
      else  
      { inEven = false;}
          return inEven;  
         }
      ;
  }
  
  class main{
  public static void main(String args[])
  
    {ChkNum e=new ChkNum();
  
      if(e.inEven(10))System.out.println("10 is even");
      if(e.inEven(9))System.out.println("9 is even");
      if(e.inEven(8))System.out.println("8 is even");
  
  
      }
  }
  </code></pre>