title: if statement with integers
body: <p>I'm new at Java. I'm looking for some help with homework. I wont post the full code I was doing that originally but I dont think it will help me learn it. </p>
  
  <p>I have a program working with classes. I have a class that will validate a selection and a class that has my setters and getters and a class that the professor coded with the IO for the program (it's an addres book)</p>
  
  <p>I have a statement in my main like this that says </p>
  
  <pre><code>//create new scanner
  Scanner ip = new Scanner(System.in);
  
  System.out.println();
  int menuNumber = Validator.getInt(ip, "Enter menu number: ", 1, 3);
  
  if (menuNumber = 1)
  {
      //print address book    
  }
  
  else if (menuNumber = 2)
  {
      // get input from user
  }
  else 
  {
      Exit
  }
  </code></pre>
  
  <p>If you look at my if statement <code>if (menuNumber = 1)</code> I get a red line that tells me I cannot convert an int to boolean. I thought the answer was <code>if (menuNumber.equals(1))</code> but that also gave me a similar error.</p>
  
  <p>I'm not 100% on what I can do to fix it so I wanted to ask for help. Do I need to convert my entry to a string? Right  now my validator looks something like: </p>
  
  <pre><code>if (int &lt; 1)
  print "Error entry must be 1, 2 or 3)
  else if (int &gt; 3) 
  print "error entry must 1, 2, or 3)
  else 
  print "invalid entry"
  </code></pre>
  
  <p>If I convert my main to a string instead of an int wont I have to change this all up as well? </p>
  
  <p>Thanks again for helping me I haven't been diong that great and I want to get a good chunk of the assignment knocked out.</p>