O'Reilly logo
  • yagsti Yagsti thinks this is interesting:

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

From

Cover of Java™ Puzzlers: Traps, Pitfalls, and Corner Cases

Note

This one essentially checks the last bit and returns even/odd based on that. Kind of only works for powers of 2, but it's a cool trick.