Is there more than one way to test to see if an integer is even or odd? So far I've only been abe to devise one solution. The solution makes use of the AND bitwise operator.

Code:
public boolean isNumOdd(int num)
{
   if (1 & num)
      return true;
   else
      return false;
}
PBP code ...

Code:
main:
   if 1 & num then
      oddNum = true
   else
      oddNum = false
   end if
Has anyone got another way of doing this? I'm incredibly keen to hear your thoughts.

Best Regards,

Trent Jackson