title: Write a method called isOdd() in a class called OddTest, which takes an int as an argument and returns true if the int is odd
body: <p>I'm in my first year of Java and am having trouble with with a boolean method to test if even or odd. I have most of the code, but when I enter an odd number it returns it as even. My professor gave us the signature of the method: <code>public static boolean isOdd(int number)</code></p>
  
  <pre><code>package homeWork1;
  import java.util.Scanner;
  
  public class OddTest {
  
     public static void main(String args[])
     {
        int number;
        System.out.println("Enter an integer to check if it is odd or even: ");
        Scanner input = new Scanner(System.in);
        number = input.nextInt();
        isOdd(number);
  
        boolean answer=isOdd(number);
        if (answer=true)
        {
            System.out.println("EVEN");
        }
  
        if (answer=false)
        {
            System.out.println("ODD");
        }
  
  
  
     }
     public static boolean isOdd(int number)
     { 
      if(number % 2 == 0)
     {
          return true;
      }
      return false;
  
  }
  </code></pre>