

How to find Even or Odd number without Modulus Operator - RohitS5
http://javarevisited.blogspot.hk/2013/04/how-to-check-if-number-is-even-or-odd.html

======
ryankey721
Are problems like these actually asked during job interviews?

I don't mean that this isn't a good topic, just that I always imagined that
interview questions would be harder to solve and that they wouldn't ask for
contrived solutions (solutions that aren't obvious and could lead to bugs for
new coders, while not being better in many other ways).

~~~
javinpaul
Hi Ryankey721, yes, it does get asked. Interviews are funny, some time you get
theoretical non relevant question, some time easy one like this, and very
rarely relevant coding exercise.

------
charleslmunger
Dear ${DEITY}, this makes all java programmers look bad. Really all it should
say is

public static boolean isOdd(int i) { return i & 1 == 1; }

~~~
javinpaul
This looks really nice, better than isEven() version.

public static boolean isOdd(int i) { return i & 1 == 1; }

