this post was submitted on 15 Jul 2025
441 points (94.5% liked)

Programmer Humor

37270 readers
30 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] OddMinus1@sh.itjust.works 4 points 4 days ago* (last edited 4 days ago) (1 children)

Could also be done recursive, I guess?

boolean isEven(int n) {
  if (n == 0) {
    return true;
  } else {
    return !isEven(Math.abs(n - 1));
  }
}