this post was submitted on 15 Jul 2025
455 points (94.9% liked)

Programmer Humor

37227 readers
305 users here now

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

Rules:

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] OddMinus1@sh.itjust.works 3 points 1 day ago* (last edited 1 day 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));
  }
}