title: even or odd number using methods in java
body: <p>java code to find even or odd number using methods. please help me i am getting below error..
  <a href="https://i.stack.imgur.com/tmWcY.png" rel="nofollow noreferrer">compiler output</a></p>
  
  <p>my code is </p>
  
  <pre><code>class evenodd{
  public static int evenodd(int num) {
      if(num%2==0){
          System.out.println("true");
      }
      else
          { System.out.println("false");
  }
  public static void main(String[] args) {
      int evenodd=evenodd(9);
  }
  }   
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/WH4QV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WH4QV.png" alt="enter image description here"></a></p>